22d481f6a6ac88bea4ec64f97e99132e47336f63,qucumber/callbacks.py,ModelSaver,on_epoch_end,#ModelSaver#Any#Any#,71

Before Change


                metadata = self.metadata(rbm, epoch)
            elif isinstance(self.metadata, dict):
                metadata = self.metadata
            elif self.metadata is None:
                metadata = {}

            if self.metadata_only:
                torch.save(metadata, save_path)
            else:

After Change


    def on_epoch_end(self, rbm, epoch):
        if epoch % self.period == 0:
            save_path = os.path.join(self.path, self.file_name.format(epoch))
            self._save(rbm, epoch, save_path)


class Logger(Callback):
    Callback which logs output at regular intervals.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: PIQuIL/QuCumber
Commit Name: 22d481f6a6ac88bea4ec64f97e99132e47336f63
Time: 2018-07-12
Author: emerali@users.noreply.github.com
File Name: qucumber/callbacks.py
Class Name: ModelSaver
Method Name: on_epoch_end


Project Name: sentinel-hub/eo-learn
Commit Name: 1d1c2b76dcaa01fe84735868b93fb27dc5594946
Time: 2019-12-24
Author: jovan.visnjic@sinergise.com
File Name: core/eolearn/core/eodata.py
Class Name: EOPatchIO
Method Name: save


Project Name: HyperGAN/HyperGAN
Commit Name: 0cc7ba44f0bb712c36b0512a4864f70b3632927f
Time: 2020-07-13
Author: martyn@255bits.com
File Name: hypergan/gans/base_gan.py
Class Name: BaseGAN
Method Name: save