87b7e56093996e908d310ccd852e7df0a88f2f19,example/main.py,,train,#Any#Any#Any#Any#Any#Any#,164

Before Change



            loss = criterion(output[0], target)
            for j in range(1, len(output)):
                loss += criterion(output[j], target)
            output = output[0]
        else:  // single output
            loss = criterion(output, target)
        acc = accuracy(output, target, idx)

After Change


        // compute output
        output = model(input)
        if type(output) == list:  // multiple output
            loss = 0
            for o in output:
                loss += criterion(o, target, target_weight)
            output = output[-1]
        else:  // single output
            loss = criterion(output, target, target_weight)
        acc = accuracy(output, target, idx)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: bearpaw/pytorch-pose
Commit Name: 87b7e56093996e908d310ccd852e7df0a88f2f19
Time: 2019-02-25
Author: platero.yang@gmail.com
File Name: example/main.py
Class Name:
Method Name: train


Project Name: hunkim/PyTorchZeroToAll
Commit Name: 55b880469ced115de9949d5d25ff835dabbb2caa
Time: 2017-11-08
Author: hunkim@gmail.com
File Name: 12_2_hello_rnn.py
Class Name:
Method Name:


Project Name: bearpaw/pytorch-pose
Commit Name: dc9a7266ed6693f9a835ab411f85fa56e77065a8
Time: 2017-06-14
Author: platero.yang@gmail.com
File Name: example/mpii.py
Class Name:
Method Name: train