I am working on the VGG16 classification. But when I tried to test the model. I meet this error.

image930×759 101 KB

I tried to change for i in range(batch_size): to for i in range(len(target.data)):. But I still get this error. Anybody help me?