allenai / XNOR-Net

ImageNet classification using binary Convolutional Neural Networks
https://xnor.ai/
Other
856 stars 239 forks source link

Problem about prediction score when testing an image #30

Open lyt0511 opened 7 years ago

lyt0511 commented 7 years ago

When I used the pre-trained module to test an image, I wrote codes as below

predictions = model:forward(img:cuda())
print(predictions:exp())

and then I got [torch.CudaTensor of size 4x1000] ,which means the vector about the final prediction score is 4*1000. However we know the last layer is nn.View(1000) My test result have got three extra dimension, WHY??

jiecaoyu commented 6 years ago

Your input Image probably has the wrong size.