0ad33d606682537466f3430fc6d6ac7d47460f1a,intermediate_source/spatial_transformer_tutorial.py,,,#,146

Before Change


        return F.log_softmax(x, dim=1)


model = Net()
if use_cuda:
    model.cuda()

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Training the model
// ------------------
//
// Now, let"s use the SGD algorithm to train the model. The network is
// learning the classification task in a supervised way. In the same time
// the model is learning STN automatically in an end-to-end fashion.


optimizer = optim.SGD(model.parameters(), lr=0.01)


def train(epoch):

After Change


        return F.log_softmax(x, dim=1)


model = Net().to(device)

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Training the model
// ------------------
//
// Now, let"s use the SGD algorithm to train the model. The network is
// learning the classification task in a supervised way. In the same time
// the model is learning STN automatically in an end-to-end fashion.


optimizer = optim.SGD(model.parameters(), lr=0.01)


def train(epoch):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: pytorch/tutorials
Commit Name: 0ad33d606682537466f3430fc6d6ac7d47460f1a
Time: 2018-04-24
Author: soumith@gmail.com
File Name: intermediate_source/spatial_transformer_tutorial.py
Class Name:
Method Name:


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 84e2cf87e0fe23fe3432b74ab484b1b71cd729b3
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ch18/train.py
Class Name:
Method Name:


Project Name: pytorch/examples
Commit Name: 645c7c386e62d2fb1d50f4621c1a52645a13869f
Time: 2018-04-24
Author: soumith@gmail.com
File Name: mnist/main.py
Class Name:
Method Name: