x=x.view(x.size(0),3 64 64)
out=autoencoder(x)
pred=out.argmax(dim=1)
correct=pred.eq(y).sum().float().item()
total_correct+=correct
total_num=len(test_loader.dataset)
acc=total_correct/total_num
I still use the onehot encoding to return the predicted value, but this is wrong, because I am using an autoencoder, so I don’t know how to return the predicted value.