d01c29228db3bffb451be36e2d556262597971c9,base/base_trainer.py,BaseTrainer,__init__,#BaseTrainer#Any#Any#Any#Any#Any#Any#,14

Before Change


        self.start_epoch = 1
        self.checkpoint_dir = os.path.join(config["trainer"]["save_dir"], self.name)
        ensure_dir(self.checkpoint_dir)
        json.dump(config, open(os.path.join(self.checkpoint_dir, "config.json"), "w"),
                  indent=4, sort_keys=False)
        if resume:
            self._resume_checkpoint(resume)

After Change



        // Save configuration into checkpoint directory:
        ensure_dir(self.checkpoint_dir)
        with open(self.checkpoint_dir, "config.json", "w") as handle:
            json.dump(config, handle, indent=4, sort_keys=False)

        if resume:
            self._resume_checkpoint(resume)

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

Frequency: 3

Non-data size: 4

Instances


Project Name: victoresque/pytorch-template
Commit Name: d01c29228db3bffb451be36e2d556262597971c9
Time: 2018-09-21
Author: borgesan@ifi.uio.no
File Name: base/base_trainer.py
Class Name: BaseTrainer
Method Name: __init__


Project Name: pyinstaller/pyinstaller
Commit Name: a5505747ac8b1f3891a63363a9b86af480452f77
Time: 2018-05-29
Author: itsayellow+dev@gmail.com
File Name: PyInstaller/building/osx.py
Class Name: BUNDLE
Method Name: assemble


Project Name: victoresque/pytorch-template
Commit Name: 39cc03ca3193a4ec8c2b20a55be31ab38da72e1d
Time: 2018-09-21
Author: borgesan@ifi.uio.no
File Name: base/base_trainer.py
Class Name: BaseTrainer
Method Name: __init__