286a864220a00732d382a75051e11877acf13c3f,deeppavlov/core/models/keras_model.py,KerasModel,save,#KerasModel#Any#,254

Before Change


        Returns:
            Nothing
        
        if self.ser_path.is_dir():
            opt_path = "{}/{}_opt.json".format(self.ser_path, self._ser_file)
            weights_path = "{}/{}.h5".format(self.ser_path, self._ser_file)
        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


            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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

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: 6b33ca24d5df63dcae69f4e6140327f5fecbc897
Time: 2018-01-26
Author: ol.gure@gmail.com
File Name: deeppavlov/core/models/tf_model.py
Class Name: TFModel
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: 0ddd27b71f54be5682da90473d00ea671a3459ca
Time: 2018-01-29
Author: arkhipov@yahoo.com
File Name: deeppavlov/core/models/tf_model.py
Class Name: TFModel
Method Name: save