Epoch 38 but my data is far from being close to labels. I will try more for sure but TensorFlow and Keras give me pretty good accuracy on epoch 20. I deleted Softmax as was recommended. What’s wrong with my model?
First 20 labels should be 0 and the rest 16 should be 1.
38 0.6869633197784424
tensor([[ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205],
        [ 0.0988, -0.1205]], grad_fn=<ThAddmmBackward>)

I corrected several mistakes in my model and make it work with CrossEntropy but I don’t get good accuracy. And my output is far away from labels.
Labels shape:
torch.Size([36])

Labels content:
tensor([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
        1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])

My model:
model = torch.nn.Sequential(
        torch.nn.Conv2d(3, 64, kernel_size=(3, 3)),
        torch.nn.ReLU(),
        torch.nn.Conv2d(64, 64, kernel_size=(3, 3)),
        torch.nn.ReLU(),
        torch.nn.MaxPool2d(kernel_size=(2, 2)),
        torch.nn.Dropout(0.25),
        Flatten(),
        torch.nn.Linear(457856, 128),
        torch.nn.ReLU(),
        torch.nn.Linear(128, 2)
        )