7b53af23f51fdffe2692962db410cf9ce6dc0512,scripts/classification/imagenet/train_imagenet.py,,train,#Any#Any#,161

Before Change


            with ag.record():
                outputs = [net(X) for X in data]
                loss = [L(yhat, y) for yhat, y in zip(outputs, label_smooth)]
            for l in loss:
                l.backward()
            trainer.step(batch_size)
            acc_top1.update(label, outputs)
            acc_top5.update(label, outputs)
            train_loss += sum([l.sum().asscalar() for l in loss])

After Change


            with ag.record():
                outputs = [net(X) for X in data]
                loss = [L(yhat, y) for yhat, y in zip(outputs, label_smooth)]
            ag.backward(loss)
            trainer.step(batch_size)
            acc_top1.update(label, outputs)
            acc_top5.update(label, outputs)
            train_loss += sum([l.sum().asscalar() for l in loss])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: dmlc/gluon-cv
Commit Name: 7b53af23f51fdffe2692962db410cf9ce6dc0512
Time: 2018-05-15
Author: hetong007@gmail.com
File Name: scripts/classification/imagenet/train_imagenet.py
Class Name:
Method Name: train


Project Name: dmlc/gluon-cv
Commit Name: 9e951df82dece17a34a57bb43253c2100aef2c6b
Time: 2019-07-28
Author: jeff.lee.sjtu@gmail.com
File Name: scripts/pose/simple_pose/train_simple_pose.py
Class Name:
Method Name: train


Project Name: dmlc/gluon-cv
Commit Name: 7b53af23f51fdffe2692962db410cf9ce6dc0512
Time: 2018-05-15
Author: hetong007@gmail.com
File Name: scripts/classification/imagenet/train_imagenet.py
Class Name:
Method Name: train_dummy