Ok when you call recall top in your code here:
train_recall.append(recallTop(y.cpu(), output.cpu()))
train_acc.append(accuracyTop(y.cpu(), output.cpu()))

do what I did in that code snippet and convert those to cpu.
Also do this in the validation loop.