1fa08cbb00034b2af9e25720a99d11af70360bf8,beginner_source/nn_tutorial.py,Mnist_Logistic,forward,#Mnist_Logistic#,304

Before Change


        self.bias = nn.Parameter(torch.zeros(10))

    def forward(self, xb):
        return xb @ self.weights + self.bias

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Since we"re now using an object instead of just using a function, we
// first have to instantiate our model:

After Change


        super().__init__()
        self.lin = nn.Linear(784, 10)

    def forward(self, xb):
        return self.lin(xb)

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// We instantiate our model and calculate the loss in the same way as before:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


Project Name: pytorch/tutorials
Commit Name: 1fa08cbb00034b2af9e25720a99d11af70360bf8
Time: 2020-12-02
Author: brianjo@fb.com
File Name: beginner_source/nn_tutorial.py
Class Name: Mnist_Logistic
Method Name: forward


Project Name: pytorch/tutorials
Commit Name: 0bda28d38dad2325e26ab676ae3c1b9f6f2d5ee2
Time: 2019-02-08
Author: juan.cruz@ibm.com
File Name: beginner_source/nn_tutorial.py
Class Name: Mnist_Logistic
Method Name: forward


Project Name: pytorch/tutorials
Commit Name: 1fa08cbb00034b2af9e25720a99d11af70360bf8
Time: 2020-12-02
Author: brianjo@fb.com
File Name: beginner_source/nn_tutorial.py
Class Name: Mnist_Logistic
Method Name: forward


Project Name: pytorch/tutorials
Commit Name: f754198e4b1ad99b11c87291fdc849a3d4732a49
Time: 2018-10-30
Author: brianjo@fb.com
File Name: beginner_source/nn_basics.py
Class Name: Mnist_Logistic
Method Name: forward


Project Name: pytorch/tutorials
Commit Name: a42fb20c8be5c113321f710eb767f98d3264725c
Time: 2021-02-08
Author: SimonCW@users.noreply.github.com
File Name: beginner_source/nn_tutorial.py
Class Name: Mnist_Logistic
Method Name: forward