5390c650dadd1e86b6c43543ac0ed384e8ebfc4d,deeppavlov/core/models/keras_model.py,KerasModel,save,#KerasModel#Any#,189
Before Change
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()))
log.info("[saving model to {}]".format(opt_path))
self.model.save_weights(weights_path)
After Change
Returns:
None
if not fname:
fname = self.save_path
else:
fname = Path(fname).resolve()
if not fname.parent.is_dir():
raise ConfigError("Provided save path is incorrect!")
else:
opt_path = f"{fname}_opt.json"
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: deepmipt/DeepPavlov
Commit Name: 5390c650dadd1e86b6c43543ac0ed384e8ebfc4d
Time: 2018-05-15
Author: yoptar@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: 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