Shouldnt you be doing
def compute_accuracy(Y_target, hypothesis):
    Y_prediction = hypothesis.data.max(dim=1)[1]
    accuracy = torch.mean( (Y_prediction.data == Y_target.data).float() )     
    return accuracy.item()

Also I guess you should Increase your batchsize, your batchsize for such large number of classes is very small.
I was training on imagenet with batchsize of 10! and this happened to me, I increased the batchize to 64 and all was good again!
Give that a try for sure.
Also, you have very little data for that huge number of classes! 50K for 2K classes means you have 25 samples per each class! and you are not finetuning either! you are also discarding lots of information in earlier layers and have a relatively shallow network! the earlier layers only get you primitive filters, so instead, decrease the input size but downsample much less frequently with a deeper net + finetuning and you should be getting better results imho.