I use MINST benchmark to training a simple MLP neural network(batch size = 32), but in the test phase, i want to use one picture to test. Does anyone know about it ?
I’m not sure whether it’s what’s you’re asking or not, but I’d say you may be missing the reshaping of your one testing image.
There shouldn’t be any difference between training with 32 elements in your batch and testing one image.
That’s it (if I’m guessing your dimensions correctly):
32 x num_channels x width x height
1 x num_channels x width x height
Hope it helps
thanks for reply.but my program is error. below is part of my code:
do you know what happen? thanks
You shouldn’t wrap your
DataLoader instance into a
Just use this loop:
for data in test_loader: img, label = data # or for img, label in test_loader: # your training code