I’m guessing you are working on multi-class single-label classification, with 264 classes but only one target per input, right?
In that case, you need to check if the prediction is the correct one, so check if your prediction is the same as the index in your one-hot target vector!
Something like that should work:
_, predicted = torch.max(outputs, 1)
_, target = torch.max(annotations, 1)
correct += predicted.eq(target).sum().item()