fc8951bbd36b14099e41fe171ab57e9f3937fe4f,congan_train.py,,calc_gradient_penalty,#,95
Before Change
if cuda_available:
interpolates = interpolates.cuda()
interpolates = autograd.Variable(interpolates, requires_grad=True)
disc_interpolates, _ = netD(interpolates)
After Change
alpha = alpha.view(BATCH_SIZE, 3, DIM, DIM)
alpha = alpha.cuda() if cuda_available else alpha
fake_data = fake_data.view(BATCH_SIZE, 3, DIM, DIM)
interpolates = alpha * real_data.detach() + ((1 - alpha) * fake_data.detach())
if cuda_available:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: jalola/improved-wgan-pytorch
Commit Name: fc8951bbd36b14099e41fe171ab57e9f3937fe4f
Time: 2018-05-08
Author: waterstorm64@gmail.com
File Name: congan_train.py
Class Name:
Method Name: calc_gradient_penalty
Project Name: jalola/improved-wgan-pytorch
Commit Name: fc8951bbd36b14099e41fe171ab57e9f3937fe4f
Time: 2018-05-08
Author: waterstorm64@gmail.com
File Name: gan_train.py
Class Name:
Method Name: calc_gradient_penalty
Project Name: ikostrikov/pytorch-a2c-ppo-acktr
Commit Name: c28b2e4cfd60a5b131a1f8752d484b9c99d05e81
Time: 2017-11-17
Author: ikostrikov@gmail.com
File Name: main.py
Class Name:
Method Name: main