0de148f6892361e61d4b68cf97814e73692f6b1a,docs/_static/examples/gan.py,,,#,124

Before Change



// Configure data loader
os.makedirs("./data/mnist", exist_ok=True)
transform = transforms.Compose([
                        transforms.ToTensor(),
                        transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))
                   ])

dataset = datasets.MNIST("./data/mnist", train=True, download=True, transform=transform)

After Change


trial.with_train_generator(dataloader, steps=200000)
trial.to(device)

new_keys = {DISC_MODEL: discriminator.to(device), DISC_OPT: optimizer_D, GEN_OPT: optimizer_G, DISC_CRIT: disc_crit}
trial.state.update(new_keys)
trial.with_closure(closure)
trial.run(epochs=1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ecs-vlc/torchbearer
Commit Name: 0de148f6892361e61d4b68cf97814e73692f6b1a
Time: 2019-03-14
Author: mp2u16@ecs.soton.ac.uk
File Name: docs/_static/examples/gan.py
Class Name:
Method Name:


Project Name: leftthomas/SRGAN
Commit Name: eab5e7909d647e363002b529e9d39911f4a2b028
Time: 2017-12-01
Author: leftthomas@qq.com
File Name: train2.py
Class Name:
Method Name:


Project Name: pytorch/examples
Commit Name: 49ec0bd72b85be55579ae8ceb278c66145f593e1
Time: 2020-07-01
Author: matti.picus@gmail.com
File Name: mnist/main.py
Class Name:
Method Name: main