eab5e7909d647e363002b529e9d39911f4a2b028,train2.py,,train,#,36

Before Change


        train_bar = tqdm(train_loader)
        for data in train_bar:
            hr_imgs, _ = data
            lr_imgs = Variable(torch.stack([train_lr_transform(img) for img in hr_imgs], 0)).cuda()
            hr_imgs = Variable(hr_imgs).cuda()
            gen_hr_imgs = g(lr_imgs)

            // update d

After Change


        train_bar = tqdm(train_loader)
        for hr_imgs, lr_imgs in train_bar:
            hr_imgs = Variable(hr_imgs).cuda()
            lr_imgs = Variable(lr_imgs).cuda()
            gen_hr_imgs = g(lr_imgs)

            // update d
            d.zero_grad()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


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


Project Name: HyperGAN/HyperGAN
Commit Name: cf1ec69f7c4290f9959b1d902d35ce6d72c48995
Time: 2020-08-22
Author: martyn@255bits.com
File Name: hypergan/train_hooks/adversarial_norm_train_hook.py
Class Name: AdversarialNormTrainHook
Method Name: __init__


Project Name: facebookresearch/Horizon
Commit Name: 8dcbf002d0058939802920c11f74791708838791
Time: 2018-04-06
Author: edoardoc@fb.com
File Name: ml/rl/training/ddpg_predictor.py
Class Name: DDPGPredictor
Method Name: predict_q_value


Project Name: facebookresearch/Horizon
Commit Name: 8dcbf002d0058939802920c11f74791708838791
Time: 2018-04-06
Author: edoardoc@fb.com
File Name: ml/rl/training/ddpg_predictor.py
Class Name: DDPGPredictor
Method Name: predict_action