fc8951bbd36b14099e41fe171ab57e9f3937fe4f,congan_train.py,,train,#,191
Before Change
gen_cost, gen_aux_output = aD(fake_data)
//aux_label = Variable(torch.LongTensor(BATCH_SIZE), requires_grad=True).data.resize_(BATCH_SIZE).copy_(torch.from_numpy(f_label))
aux_label = autograd.Variable(torch.from_numpy(f_label).long().cuda())
aux_errG = aux_criterion(gen_aux_output, aux_label).mean()
gen_cost = -gen_cost.mean()
g_cost = ACGAN_SCALE_G*aux_errG + gen_cost
After Change
fake_data = aG(noise)
gen_cost, gen_aux_output = aD(fake_data)
aux_label = torch.from_numpy(f_label).long()
if cuda_available:
aux_label = aux_label.cuda()
aux_errG = aux_criterion(gen_aux_output, aux_label).mean()
gen_cost = -gen_cost.mean()
g_cost = ACGAN_SCALE_G*aux_errG + gen_cost
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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: train
Project Name: jwyang/faster-rcnn.pytorch
Commit Name: 6def46044be4f04b45704562396b39108ec12bf0
Time: 2017-08-30
Author: echosenm@gmail.com
File Name: lib/model/rpn/proposal_target_layer_4.py
Class Name: _ProposalTargetLayer
Method Name: _sample_rois_pytorch
Project Name: DagnyT/hardnet
Commit Name: 3f277c18dee8a6470cdda8a397ce71f56dabdc9e
Time: 2017-07-25
Author: ducha.aiki@gmail.com
File Name: Losses.py
Class Name:
Method Name: loss_HardNet