894e11848c556e119722eee8395017dcab6ed485,tgen/tfclassif.py,RerankingClassifier,_save_checkpoint,#RerankingClassifier#,159

Before Change


        Save a checkpoint to a temporary path; set `self.checkpoint_path` to the path
        where it is saved; if called repeatedly, will always overwrite the last checkpoint.
        if not self.checkpoint_path:
            fh, path = tempfile.mkstemp(".ckpt", "tftreecl-", self.checkpoint_path)
            self.checkpoint_path = path
        log_info("Saving checkpoint to %s" % self.checkpoint_path)
        self.saver.save(self.session, self.checkpoint_path)

After Change


        Save a checkpoint to a temporary path; set `self.checkpoint_path` to the path
        where it is saved; if called repeatedly, will always overwrite the last checkpoint.
        if not self.checkpoint_path:
            path = tempfile.mkdtemp(suffix="", prefix="tftreecl-")
            self.checkpoint_path = os.path.join(path, "ckpt")
        log_info("Saving checkpoint to %s" % self.checkpoint_path)
        self.saver.save(self.session, self.checkpoint_path)

    def restore_checkpoint(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: UFAL-DSG/tgen
Commit Name: 894e11848c556e119722eee8395017dcab6ed485
Time: 2017-04-18
Author: o.dusek@hw.ac.uk
File Name: tgen/tfclassif.py
Class Name: RerankingClassifier
Method Name: _save_checkpoint


Project Name: NifTK/NiftyNet
Commit Name: f3411bb824254b62f249772b530f74728dcd5c30
Time: 2018-05-03
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/image_sets_partitioner.py
Class Name: ImageSetsPartitioner
Method Name: grep_files_by_data_section


Project Name: UFAL-DSG/tgen
Commit Name: 894e11848c556e119722eee8395017dcab6ed485
Time: 2017-04-18
Author: o.dusek@hw.ac.uk
File Name: tgen/seq2seq.py
Class Name: Seq2SeqGen
Method Name: _save_checkpoint