promach:

pred = tensor([0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1], device=‘cuda:0’)


This really does not sum up to 1 which is based on softmax().
I do not think the code is using softmax() here, I presume ? The softmax is inside the squeezeNet model itself
I have searched for the occurrence of the keyword “softmax”, but it is not found in the code.
Besides, why pred is tensor of size [ batch_size x 1 ] ?