2e9abd7c09c15955bffa57fe249de0b6ee06f8ea,plugins/Model_IAE/AutoEncoder.py,AutoEncoder,save_weights,#AutoEncoder#,41
Before Change
def save_weights(self):
model_dir = str(self.model_dir)
if os.path.isdir(model_dir + "_bk"):
shutil.rmtree(model_dir + "_bk")
shutil.move(model_dir, model_dir + "_bk")
os.mkdir(model_dir)
self.encoder.save_weights(str(self.model_dir / encoderH5))
self.decoder.save_weights(str(self.model_dir / decoderH5))
self.inter_both.save_weights(str(self.model_dir / inter_bothH5))
self.inter_A.save_weights(str(self.model_dir / inter_AH5))
After Change
def save_weights(self):
model_dir = str(self.model_dir)
for model in hdf.values():
backup_file(model_dir, model)
self.encoder.save_weights(str(self.model_dir / hdf["encoderH5"]))
self.decoder.save_weights(str(self.model_dir / hdf["decoderH5"]))
self.inter_both.save_weights(str(self.model_dir / hdf["inter_bothH5"]))
self.inter_A.save_weights(str(self.model_dir / hdf["inter_AH5"]))
self.inter_B.save_weights(str(self.model_dir / hdf["inter_BH5"]))
print("saved model weights")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 21
Instances
Project Name: deepfakes/faceswap
Commit Name: 2e9abd7c09c15955bffa57fe249de0b6ee06f8ea
Time: 2018-04-23
Author: 36920800+torzdf@users.noreply.github.com
File Name: plugins/Model_IAE/AutoEncoder.py
Class Name: AutoEncoder
Method Name: save_weights
Project Name: deepfakes/faceswap
Commit Name: 2e9abd7c09c15955bffa57fe249de0b6ee06f8ea
Time: 2018-04-23
Author: 36920800+torzdf@users.noreply.github.com
File Name: plugins/Model_GAN/Model.py
Class Name: GANModel
Method Name: save_weights
Project Name: deepfakes/faceswap
Commit Name: 2e9abd7c09c15955bffa57fe249de0b6ee06f8ea
Time: 2018-04-23
Author: 36920800+torzdf@users.noreply.github.com
File Name: plugins/Model_GAN128/Model.py
Class Name: GANModel
Method Name: save_weights
Project Name: deepfakes/faceswap
Commit Name: 2e9abd7c09c15955bffa57fe249de0b6ee06f8ea
Time: 2018-04-23
Author: 36920800+torzdf@users.noreply.github.com
File Name: plugins/Model_IAE/AutoEncoder.py
Class Name: AutoEncoder
Method Name: save_weights