mnistCUDNN

Hi,

i am able to run ~/cudnn_samples_v5/mnistCUDNN, but when i provide an image it fails to classify it.
any idea why ?

~/cudnn_samples_v5/mnistCUDNN$ ./mnistCUDNN device=0 image=test.jpg
cudnnGetVersion() : 5105 , CUDNN_VERSION from cudnn.h : 5105 (5.1.5)
Host compiler version : GCC 5.4.0
There are 1 CUDA capable devices on your machine :
device 0 : sms  2  Capabilities 5.3, SmClock 72.0 Mhz, MemSize (Mb) 3994, MemClock 12.8 Mhz, Ecc=0, boardGroupID=0
Using device 0
Loading image test.jpg
Performing forward propagation ...
Testing cudnnGetConvolutionForwardAlgorithm ...
Fastest algorithm is Algo 1
Testing cudnnFindConvolutionForwardAlgorithm ...
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: 0.244158 time requiring 3464 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: 0.284421 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: 0.367789 time requiring 57600 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: 1.237946 time requiring 2057744 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: 14.187519 time requiring 207360 memory
Resulting weights from Softmax:
0.9378809 0.0584347 0.0000610 0.0000225 0.0030457 0.0000133 0.0000814 0.0000026 0.0004572 0.0000006 

Result of classification: 0

The program is saying that it classified the image as digit zero with 0.9378809 confidence, not that it failed with error code 0.
The ‘result of classification’ is the index of the highest confidence value (argmax), where each index corresponds to the digits 0-9.

What digit is test.jpg a picture of? (MNIST is a database of handwritten Arabic numerals)

i am using number “10” in the image. Does the size has to be 28*28 ?

I believe that MNIST is designed to only accept 28x28 image of a single digit 0-9. Does it work if you try an image of a single numeral?

Thanks Dusty, i went through the code, it only accepts 28x28