Hello guys!
I’m trying to make a simple neural network, but I’m struggling to understand where the softmax gets in the pipeline. I’m using the tutorials function train_model() – which can be accessed here https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html 9 --.
I created this simple NN :
        class FC(nn.Module):
            def __init__(self, input_size, hidden_size, num_classes):
                super(FC, self).__init__()
                self.d1 = nn.Dropout(0.5)
                self.h1 = nn.Linear(input_size, hidden_size)
                self.h2 = nn.Linear(hidden_size, num_classes)

            def forward(self, x):
                x = self.d1(x)
                x = self.h1(x)
                x = F.relu(x)
                X = self.h2(x)
                return x

and I provide an instance of this network to the train_model() function I mentioned. But when I print the output it gives during the training phase (code line outputs = model(inputs)), it gives me numbers greater than 1, which is strange since I’m expecting to make a softmax classifier which gives me a probability distribution. Can someone please help me with this?!