f4811d994f466d3d466efcb755eb1ebf08b02982,musegan/model.py,Model,load_latest,#Model#Any#,145

Before Change


        if checkpoint_dir is None:
            checkpoint_dir = self.config["checkpoint_dir"]
        print("[*] Loading checkpoint...")
        checkpoint_path = tf.train.latest_checkpoint(checkpoint_dir)
        if checkpoint_path is None:
            raise ValueError("Checkpoint not found")
        self.saver.restore(self.sess, checkpoint_path)

After Change


        if checkpoint_dir is None:
            checkpoint_dir = self.config["checkpoint_dir"]
        print("[*] Loading checkpoint...")
        with open(os.path.join(checkpoint_dir, "checkpoint")) as f:
            checkpoint_name = os.path.basename(f.readline().split()[1])
        checkpoint_path = os.path.join(checkpoint_dir, checkpoint_name)
        if checkpoint_path is None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: salu133445/musegan
Commit Name: f4811d994f466d3d466efcb755eb1ebf08b02982
Time: 2018-10-24
Author: salu133445@citi.sinica.edu.tw
File Name: musegan/model.py
Class Name: Model
Method Name: load_latest


Project Name: dpressel/mead-baseline
Commit Name: 0f482aaa64ce263ec189f39d98828efe0efe3a9c
Time: 2018-12-08
Author: blester125@users.noreply.github.com
File Name: python/baseline/tf/seq2seq/train.py
Class Name: Seq2SeqTrainerTf
Method Name: recover_last_checkpoint


Project Name: tensorflow/magenta
Commit Name: d63da42093649a3f18c286bc9044bacc978055b3
Time: 2021-03-29
Author: annahuang@google.com
File Name: magenta/models/coconet/lib_tfsampling.py
Class Name: CoconetSampleGraph
Method Name: instantiate_sess_and_restore_checkpoint