4441480fde64e42a9c4af205bf2ab8003511172e,test.py,,NN,#,9

Before Change


    
    end = time.time()
    for batch_idx, (inputs, targets, indexes) in enumerate(testloader):
        inputs, targets = inputs.cuda(), targets.cuda()
        inputs, targets = Variable(inputs, volatile=True), Variable(targets)
        batchSize = inputs.size(0)
        features = net(inputs)
        net_time.update(time.time() - end)

After Change


import numpy as np

def NN(epoch, net, lemniscate, trainloader, testloader, recompute_memory=0):
    device = "cuda" if torch.cuda.is_available() else "cpu"

    net.eval()
    net_time = AverageMeter()
    cls_time = AverageMeter()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: zhirongw/lemniscate.pytorch
Commit Name: 4441480fde64e42a9c4af205bf2ab8003511172e
Time: 2018-07-26
Author: xavibrowu@gmail.com
File Name: test.py
Class Name:
Method Name: NN


Project Name: zhirongw/lemniscate.pytorch
Commit Name: 4441480fde64e42a9c4af205bf2ab8003511172e
Time: 2018-07-26
Author: xavibrowu@gmail.com
File Name: test.py
Class Name:
Method Name: kNN


Project Name: kentsommer/pytorch-value-iteration-networks
Commit Name: 3d054be72e81af7acb1109028d7be4fceebae720
Time: 2019-12-31
Author: kelvinson@foxmail.com
File Name: train.py
Class Name:
Method Name: test


Project Name: kentsommer/pytorch-value-iteration-networks
Commit Name: 3d054be72e81af7acb1109028d7be4fceebae720
Time: 2019-12-31
Author: kelvinson@foxmail.com
File Name: train.py
Class Name:
Method Name: train