I have done a lot of searching around trying to find answers to this issue that I face. I have tried reddit, SO and just searching on google but to no avail. I am having issues with my results showing the following:
I have tried changing the learning rate, batch size and I have also tried multiplying the train_acc and train_loss by 100 after dividing by the number of images. None of this works and still produces the unusual results.
Please help me figure out what I am doing wrong !!!
Could you check the type of (prediction == labels.data)? If it’s a ByteTensor, could cast it to float before summing it?
Also could you divide by a float number, i.e. 4242. instead of 4242?
There might be some other issue then. sometensor.sum() and torch.sum(sometensor) should yield the same results. Maybe you are calling .sum() on a non-pytorch tensor (e.g., a numpy array)?