Back to Annotated Deep Learning Paper Implementations

Experiment

labml_nn/gan/cycle_gan/experiment.ipynb

latest1.2 KB
Original Source

Cycle GAN

This is an experiment training Cycle GAN model.

Install the labml-nn package

!pip install labml-nn

Imports

from labml import experiment
from labml.utils.pytorch import get_modules
from labml_nn.gan.cycle_gan import Configs

Create an experiment

experiment.create(name="cycle_gan")

Initialize configurations

conf = Configs()

Set experiment configurations and assign a configurations dictionary to override configurations

experiment.configs(conf, {'dataset_name': 'summer2winter_yosemite'})

Initialize

conf.initialize()

Set PyTorch models for loading and saving

experiment.add_pytorch_models(get_modules(conf))

Start the experiment and run the training loop.

with experiment.start():
    conf.run()