1344dee35dbacaaaaabdaf452f0dfe74e3ab50e4,torchsample/modules/super_module.py,SuperModule,evaluate_loader,#SuperModule#Any#,144
Before Change
loss = self.loss(y_pred, y_batch)
losses.append(loss.data[0])
return torch.mean(torch.FloatTensor(losses))
After Change
return loss.data[0]
def evaluate_loader(self, loader):
nb_batches = int(math.ceil(len(loader.dataset.inputs)/loader.batch_size))
losses = torch.FloatTensor(nb_batches)
for batch_idx, (x_batch, y_batch) in enumerate(loader):
x_batch = Variable(x_batch)
y_batch = Variable(y_batch)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: ncullen93/torchsample
Commit Name: 1344dee35dbacaaaaabdaf452f0dfe74e3ab50e4
Time: 2017-04-19
Author: ncullen@modv-vlan533.0288.apn.wlan.wireless-pennnet.upenn.edu
File Name: torchsample/modules/super_module.py
Class Name: SuperModule
Method Name: evaluate_loader
Project Name: tyarkoni/pliers
Commit Name: 31cf37cb6c29afe8d6598bd9ca2d7e5ed3df1fad
Time: 2017-03-03
Author: quinten.mcnamara@gmail.com
File Name: pliers/stimuli/audio.py
Class Name: AudioStim
Method Name: __init__
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 40fa8860f0ae704f551ec46cc12c9f9b8e971730
Time: 2020-05-19
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/evasion/shadow_attack.py
Class Name: ShadowAttack
Method Name: generate