mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 04:52:13 -07:00
nothing interesting
This commit is contained in:
parent
403343e465
commit
1e7a0836f7
1 changed files with 5 additions and 0 deletions
|
@ -277,6 +277,11 @@ class ModelBase(object):
|
|||
}
|
||||
self.model_data_path.write_bytes( pickle.dumps(model_data) )
|
||||
|
||||
def load_weights_safe(self, model_filename_list):
|
||||
for model, filename in model_filename_list:
|
||||
if Path(filename).exists():
|
||||
model.load_weights(filename)
|
||||
|
||||
def save_weights_safe(self, model_filename_list):
|
||||
for model, filename in model_filename_list:
|
||||
model.save_weights( filename + '.tmp' )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue