5390c650dadd1e86b6c43543ac0ed384e8ebfc4d,deeppavlov/core/models/keras_model.py,KerasModel,save,#KerasModel#Any#,189
Before Change
Returns:
None
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)
save_json(self.opt, opt_path)
return True
def mlp(self, opt):
After Change
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:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
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: brian-team/brian2
Commit Name: b1af28585455d4cd26919749792ff3e08218242f
Time: 2012-11-15
Author: marcel.stimberg@ens.fr
File Name: brian2/equations/codestrings.py
Class Name: Expression
Method Name: eval
Project Name: chartbeat-labs/textacy
Commit Name: e8bd84284e3ac61bff123427a80218c3e5f76583
Time: 2019-08-09
Author: burtdewilde@gmail.com
File Name: textacy/io/utils.py
Class Name:
Method Name: open_sesame
Project Name: pantsbuild/pants
Commit Name: 02f703665d2e6ce7282dd201bfcb33b3bb131f03
Time: 2014-01-30
Author: jsirois@twitter.com
File Name: src/python/twitter/pants/targets/artifact.py
Class Name: Artifact
Method Name: __init__