4441480fde64e42a9c4af205bf2ab8003511172e,cifar.py,,train,#Any#,122
Before Change
inputs, targets, indexes = inputs.cuda(), targets.cuda(), indexes.cuda()
optimizer.zero_grad()
inputs, targets, indexes = Variable(inputs), Variable(targets), Variable(indexes)
features = net(inputs)
outputs = lemniscate(features, indexes)
loss = criterion(outputs, indexes)
After Change
loss.backward()
optimizer.step()
train_loss.update(loss.item(), inputs.size(0))
// measure elapsed time
batch_time.update(time.time() - end)
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 6
Instances
Project Name: zhirongw/lemniscate.pytorch
Commit Name: 4441480fde64e42a9c4af205bf2ab8003511172e
Time: 2018-07-26
Author: xavibrowu@gmail.com
File Name: cifar.py
Class Name:
Method Name: train
Project Name: jindongwang/transferlearning
Commit Name: 90fbeed3469b8bb2d5731789624b12e4c84df461
Time: 2019-10-21
Author: 1299192934@qq.com
File Name: code/deep/MRAN/MRAN.py
Class Name:
Method Name: train
Project Name: pytorch/examples
Commit Name: 645c7c386e62d2fb1d50f4621c1a52645a13869f
Time: 2018-04-24
Author: soumith@gmail.com
File Name: mnist_hogwild/train.py
Class Name:
Method Name: train_epoch
Project Name: horovod/horovod
Commit Name: 67c7f8871ce4b925d607ceec034b93d0ba9bb284
Time: 2018-09-26
Author: alexander.sergeev@live.com
File Name: examples/pytorch_mnist.py
Class Name:
Method Name: train
Project Name: horovod/horovod
Commit Name: 67c7f8871ce4b925d607ceec034b93d0ba9bb284
Time: 2018-09-26
Author: alexander.sergeev@live.com
File Name: examples/pytorch_mnist.py
Class Name:
Method Name: test
Project Name: activatedgeek/LeNet-5
Commit Name: b9d7f39a752d23a7de60ea6d679812c401fab57e
Time: 2019-01-01
Author: 1sanyamkapoor@gmail.com
File Name: run.py
Class Name:
Method Name: train