84
edits
Changes
→Implementation of a Neural Network
''' 4. Define the class structure of the NN, in the following case, we have defined 4 linear layers, that output to three functions
''' that execute rectified linear processing as an activation method. Finally instantiate the NN class.
class Net(nn.Module):
x = self.fc4(x)
return F.log_softmax(x, dim = 1)
net = Net()
''' 5. Use an optimizer to train the neural network. By passing the 1-dimensional tensor of pixel maps of each image in the training