File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1117,7 +1117,12 @@ def compute_relative_perf_matrix(self):
11171117 def statistcal_distances_via_smodel (self ):
11181118
11191119 start = timer ()
1120- mpl = fast_mpl .FastFedAvgSmodel (self .scenario , self .scenario .mpl .pretrain_epochs )
1120+ try :
1121+ mpl_pretrain = self .scenario .mpl .pretrain_epochs
1122+ except AttributeError as e :
1123+ mpl_pretrain = 2
1124+
1125+ mpl = fast_mpl .FastFedAvgSmodel (self .scenario , mpl_pretrain )
11211126 mpl .fit ()
11221127 cross_entropy = tf .keras .metrics .CategoricalCrossentropy ()
11231128 self .contributivity_scores = {'Kullbakc divergence' : [0 for _ in mpl .partners_list ],
@@ -1210,7 +1215,7 @@ def compute_contributivity(
12101215 # Contributivity 10: Partner valuation by reinforcement learning
12111216 self .PVRL (learning_rate = 0.2 )
12121217 elif method_to_compute == "S-Model" :
1213- self .s_model ()
1218+ self .statistcal_distances_via_smodel ()
12141219 else :
12151220 logger .warning ("Unrecognized name of method, statement ignored!" )
12161221
You can’t perform that action at this time.
0 commit comments