f85b3627e89681eae3b4cb36347a6bd27c39941d,finetune/saver.py,Saver,save,#Saver#Any#Any#Any#,31

Before Change


        return self.fallback_

    def save(self, finetune_obj, path, mkdir=True):
        ckpt_reader = tf.train.load_checkpoint(finetune_obj.estimator_dir)
        variable_map = ckpt_reader.get_variable_to_shape_map()
        names = [name for name in variable_map.keys() if self.exclude_matches is None or self.exclude_matches not in name]
        names = [name if name.endswith(":0") else name for name in names]  // strip the :0 off the end
        values = [ckpt_reader.get_tensor(name) for name in names]

After Change


        return SaverHook()

    def save(self, finetune_obj, path, mkdir=True):
        names, values = self.variables.keys(), self.variables.values()
        folder = os.path.dirname(path)
        if not os.path.exists(folder) and mkdir:
            os.mkdir(folder)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: f85b3627e89681eae3b4cb36347a6bd27c39941d
Time: 2018-10-09
Author: benlt@hotmail.co.uk
File Name: finetune/saver.py
Class Name: Saver
Method Name: save


Project Name: catalyst-team/catalyst
Commit Name: 54ca2c098233300e63491dad6932220d01743c56
Time: 2019-06-06
Author: scitator@gmail.com
File Name: catalyst/rl/core/sampler.py
Class Name: Sampler
Method Name: _run_trajectory_loop