d85a3d2fe863c72d884c6c79d7c690065413c2f2,beginner_source/examples_nn/two_layer_net_module.py,,,#,39

Before Change



    // Compute and print loss
    loss = criterion(y_pred, y)
    print(t, loss.item())

    // Zero gradients, perform a backward pass, and update the weights.
    optimizer.zero_grad()
    loss.backward()

After Change



    // Compute and print loss
    loss = criterion(y_pred, y)
    if t % 100 == 99:
        print(t, loss.item())

    // Zero gradients, perform a backward pass, and update the weights.
    optimizer.zero_grad()
    loss.backward()
    optimizer.step()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 8

Non-data size: 5

Instances


Project Name: pytorch/tutorials
Commit Name: d85a3d2fe863c72d884c6c79d7c690065413c2f2
Time: 2019-08-19
Author: sethweidman@fb.com
File Name: beginner_source/examples_nn/two_layer_net_module.py
Class Name:
Method Name:


Project Name: pytorch/tutorials
Commit Name: d85a3d2fe863c72d884c6c79d7c690065413c2f2
Time: 2019-08-19
Author: sethweidman@fb.com
File Name: beginner_source/examples_autograd/two_layer_net_custom_function.py
Class Name:
Method Name:


Project Name: pytorch/tutorials
Commit Name: d85a3d2fe863c72d884c6c79d7c690065413c2f2
Time: 2019-08-19
Author: sethweidman@fb.com
File Name: beginner_source/examples_autograd/tf_two_layer_net.py
Class Name:
Method Name:


Project Name: pytorch/tutorials
Commit Name: d85a3d2fe863c72d884c6c79d7c690065413c2f2
Time: 2019-08-19
Author: sethweidman@fb.com
File Name: beginner_source/examples_tensor/two_layer_net_tensor.py
Class Name:
Method Name:


Project Name: pytorch/tutorials
Commit Name: d85a3d2fe863c72d884c6c79d7c690065413c2f2
Time: 2019-08-19
Author: sethweidman@fb.com
File Name: beginner_source/examples_nn/dynamic_net.py
Class Name:
Method Name:


Project Name: pytorch/tutorials
Commit Name: d85a3d2fe863c72d884c6c79d7c690065413c2f2
Time: 2019-08-19
Author: sethweidman@fb.com
File Name: beginner_source/examples_nn/two_layer_net_nn.py
Class Name:
Method Name:


Project Name: pytorch/tutorials
Commit Name: d85a3d2fe863c72d884c6c79d7c690065413c2f2
Time: 2019-08-19
Author: sethweidman@fb.com
File Name: beginner_source/examples_autograd/two_layer_net_autograd.py
Class Name:
Method Name:


Project Name: pytorch/tutorials
Commit Name: d85a3d2fe863c72d884c6c79d7c690065413c2f2
Time: 2019-08-19
Author: sethweidman@fb.com
File Name: beginner_source/examples_nn/two_layer_net_optim.py
Class Name:
Method Name: