Phanikumar2all:

output1 = model(images)
softmax = F.log_softmax(outputs1, dim=1)


You are taking the logsoftmax of outputs1 rather than output1. Also remember input to logsoftmax has to be of the shape [8, no_of_classes, 480, 640]