53531a5b2d07790c18ed18a54604d977cbdb1189,inferno/net.py,NeuralNet,train_step,#NeuralNet#Any#Any#Any#,468

Before Change


        applied).

        
        xi, yi = to_var(xi), to_var(yi)
        self.module_.train()

        optimizer.zero_grad()

After Change


        
        self.module_.train()
        xi = to_var(xi, use_cuda=self.use_cuda)
        yi = to_var(yi, use_cuda=self.use_cuda)

        optimizer.zero_grad()
        y_pred = self.infer(xi)
        loss = self.get_loss(y_pred, yi, train=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dnouri/skorch
Commit Name: 53531a5b2d07790c18ed18a54604d977cbdb1189
Time: 2017-08-07
Author: marian.tietz@ottogroup.com
File Name: inferno/net.py
Class Name: NeuralNet
Method Name: train_step


Project Name: dnouri/skorch
Commit Name: 53531a5b2d07790c18ed18a54604d977cbdb1189
Time: 2017-08-07
Author: marian.tietz@ottogroup.com
File Name: inferno/net.py
Class Name: NeuralNet
Method Name: validation_step


Project Name: dnouri/skorch
Commit Name: 53531a5b2d07790c18ed18a54604d977cbdb1189
Time: 2017-08-07
Author: marian.tietz@ottogroup.com
File Name: inferno/net.py
Class Name: NeuralNet
Method Name: evaluation_step