Skip to content

Commit a5df438

Browse files
committed
bugfix on takeweightsfrom option
1 parent a112aff commit a5df438

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

training/training_base.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(
2929
useweights=False, testrun=False,
3030
testrun_fraction=0.1,
3131
resumeSilently=False,
32-
renewtokens=True,
32+
renewtokens=False,
3333
collection_class=DataCollection,
3434
parser=None,
3535
recreate_silently=False
@@ -241,11 +241,9 @@ def setModel(self,model,**modelargs):
241241
self.keras_model.build(None)
242242

243243
if len(self.keras_weight_model_path):
244-
from DeepJetCore.modeltools import apply_weights_where_possible
245-
tbcopy = self
246-
tbcopy.loadModel(self.keras_weight_model_path)
244+
from DeepJetCore.modeltools import apply_weights_where_possible, load_model
247245
self.keras_model = apply_weights_where_possible(self.keras_model,
248-
tbcopy.keras_model)
246+
load_model(self.keras_weight_model_path))
249247
#try:
250248
# self.keras_model=model(self.keras_inputs,**modelargs)
251249
#except BaseException as e:
@@ -358,7 +356,7 @@ def _initTraining(self,
358356
from _thread import start_new_thread
359357

360358
if self.renewtokens:
361-
print('starting afs backgrounder')
359+
print('afs backgrounder has proven to be unreliable, use with care')
362360
checkTokens()
363361
start_new_thread(renew_token_process,())
364362

0 commit comments

Comments
 (0)