mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

Following the "Predict with pre-trained models" tutorial, all my prediction probabilities are 0

Open shahsarick opened this issue 10 years ago • 9 comments

I followed the tutorial exactly from here:

http://mxnet.io/tutorials/python/predict_imagenet.html

I had to remove 'cudnn_tune' in the json file because I was getting an error regarded it not being there. Everything else is exactly the same as the tutorial and I ended up with the output looking like this:

probability=0.000000, class=n15102894 knothole probability=0.000000, class=n03209359 disk clutch probability=0.000000, class=n03212811 distillery, still probability=0.000000, class=n03212114 disposal, electric pig, garbage disposal probability=0.000000, class=n03211789 display window, shop window, shopwindow, show window

I tried the tutorial "Predict and Extract Features with Pre-trained Models" ipynb and again got top-1 accuracy of 0 after removing all the offending cudnn_tune sections. What could I be doing wrong? Any help is greatly appreciated.

shahsarick avatar Dec 02 '16 00:12 shahsarick

It might be an issue related to mxnet built with CUDA. Where did you get 'cudnn_tune' related error?

kevinthesun avatar Dec 03 '16 00:12 kevinthesun

Have you successfully built mxnet with CUDA?

kevinthesun avatar Dec 03 '16 00:12 kevinthesun

I haven't tried, how would I go about doing that?

shahsarick avatar Dec 03 '16 20:12 shahsarick

I get the error when setting the model up with the json and params files. When i delete the cudnn_tune line from the json file, the error goes away but then my predictions all show as 0.

shahsarick avatar Dec 03 '16 20:12 shahsarick

Are you running mxnet on windows? If yes, look at http://mxnet.io/get_started/setup.html#building-mxnet-on-windows You might need to install some dependencies such as CuDNN.

kevinthesun avatar Dec 04 '16 22:12 kevinthesun

I have CuDNN installed too... But I'm not sure what version I'll try v3

shahsarick avatar Dec 05 '16 05:12 shahsarick

I have the same problem. 0 becasue the GPU haven't run. and I chang gpu mod to cup with "mod = mx.mod.Module(symbol=sym, context=mx.cpu())" the results always are probability=0.007025, class=n04351699 suiting probability=0.006369, class=n04350458 suede cloth, suede probability=0.006340, class=n04502502 tweed probability=0.003876, class=n04076284 repeating firearm, repeater probability=0.003808, class=n03699591 machete, matchet, panga

So I guess we can't delete the "cudnn_tune"? & Need run with Gup?

shimiaoyuan avatar Feb 15 '17 08:02 shimiaoyuan

@shimiaoyuan I get the exact same thing! I also checked and the probabilities don't add up to 1 and image comes out as 'suiting'. However, I used the same json file on another machine (which had MXNet installed already; version 0.9.3) and that was predicting fine.

I have this issue with MXNet version 0.7 (obtained from here: https://github.com/dmlc/mxnet/releases/tag/20160531 ) running on python 2.7 after installing from the latest-build binaries and removing the line 'cudnn' from the JSON.

ilkarman avatar Feb 17 '17 11:02 ilkarman

This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks!

szha avatar Sep 28 '17 23:09 szha