This is my code,
correct_class=Variable(output_class[get_ans]).long()
loss=criterion(output,correct_class)
loss.backward()
optimizer.step()

It shows.
RuntimeError: Variable data has to be a tensor, but got int
How do I feed one image and one label to the model and update the model?