286a864220a00732d382a75051e11877acf13c3f,deeppavlov/core/models/keras_model.py,KerasModel,save,#KerasModel#Any#,254
Before Change
else:
// TODO: something is incorrect with ser_path if dir but does not exist
opt_path = "{}_opt.json".format(self.ser_path)
weights_path = "{}.h5".format(self.ser_path)
print("[ saving model: {} ]".format(opt_path))
self.ser_path.mkdir(parents=True, exist_ok=True)
self.model.save_weights(weights_path)
After Change
Returns:
Nothing
if not self.save_path:
raise ConfigError("No `save_path` is provided for Keras model!")
elif isinstance(self.save_path, Path) and not self.save_path.parent.is_dir():
raise ConfigError("Provided save path is incorrect!")
else:
opt_path = "{}_opt.json".format(str(self.save_path.resolve()))
weights_path = "{}.h5".format(str(self.save_path.resolve()))
print("[ saving model: {} ]".format(opt_path))
self.model.save_weights(weights_path)
save_json(self.opt, opt_path)
return True
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: deepmipt/DeepPavlov
Commit Name: 286a864220a00732d382a75051e11877acf13c3f
Time: 2018-01-24
Author: ol.gure@gmail.com
File Name: deeppavlov/core/models/keras_model.py
Class Name: KerasModel
Method Name: save
Project Name: deepmipt/DeepPavlov
Commit Name: 286a864220a00732d382a75051e11877acf13c3f
Time: 2018-01-24
Author: ol.gure@gmail.com
File Name: deeppavlov/core/models/keras_model.py
Class Name: KerasModel
Method Name: load
Project Name: deepmipt/DeepPavlov
Commit Name: d86f0ef86868899b112ac61e598a3333fac66ad2
Time: 2018-01-24
Author: arkhipov@yahoo.com
File Name: deeppavlov/core/models/tf_model.py
Class Name: TFModel
Method Name: save