CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

zero error rate when training with GPU

Open mohamad-hasan-sohan-ajini opened this issue 10 years ago • 2 comments

Hi I successfully download and compile latest source of CNTK on linux. I also change MininumCCMajorForGpu = 2 at cntk/source/common/BestGph.h in order to work with my GPU (GT 630M which has 2.1 compute capability). After that I tried to execute simple2d sample with GPU. But I constantly get zero error rate!!

Starting Epoch 1: learning rate per sample = 0.004000 effective momentum = 0.900000 momentum as time constant = 474.6 samples

Starting minibatch loop. Epoch[ 1 of 50]-Minibatch[ 1- 10]: CrossEntropyWithSoftmax = 0.00000000 * 500; EvalClassificationError = 0.00000000 * 500; time = 0.0166s; samplesPerSecond = 30204.2 Epoch[ 1 of 50]-Minibatch[ 11- 20]: CrossEntropyWithSoftmax = 0.00000000 * 500; EvalClassificationError = 0.00000000 * 500; time = 0.0841s; samplesPerSecond = 5945.3 Epoch[ 1 of 50]-Minibatch[ 21- 30]: CrossEntropyWithSoftmax = 0.00000000 * 500; EvalClassificationError = 0.00000000 * 500; time = 0.0118s; samplesPerSecond = 42459.2 Epoch[ 1 of 50]-Minibatch[ 31- 40]: CrossEntropyWithSoftmax = 0.00000000 * 500; EvalClassificationError = 0.00000000 * 500; time = 0.0854s; samplesPerSecond = 5856.2 ... Epoch[50 of 50]-Minibatch[ 151- 160, 80.00%]: CrossEntropyWithSoftmax = 0.00000000 * 500; EvalClassificationError = 0.00000000 * 500; time = 0.0892s; samplesPerSecond = 5606.1 Epoch[50 of 50]-Minibatch[ 161- 170, 85.00%]: CrossEntropyWithSoftmax = 0.00000000 * 500; EvalClassificationError = 0.00000000 * 500; time = 0.0153s; samplesPerSecond = 32728.9 Epoch[50 of 50]-Minibatch[ 171- 180, 90.00%]: CrossEntropyWithSoftmax = 0.00000000 * 500; EvalClassificationError = 0.00000000 * 500; time = 0.0885s; samplesPerSecond = 5646.7 Epoch[50 of 50]-Minibatch[ 181- 190, 95.00%]: CrossEntropyWithSoftmax = 0.00000000 * 500; EvalClassificationError = 0.00000000 * 500; time = 0.0113s; samplesPerSecond = 44157.9 Epoch[50 of 50]-Minibatch[ 191- 200, 100.00%]: CrossEntropyWithSoftmax = 0.00000000 * 500; EvalClassificationError = 0.00000000 * 500; time = 0.0116s; samplesPerSecond = 43207.7 Finished Epoch[50 of 50]: [Training] CrossEntropyWithSoftmax = 0.00000000 * 10000; EvalClassificationError = 0.00000000 * 10000; totalSamplesSeen = 500000; learningRatePerSample = 0.001; epochTime=0.901499s SGD: Saving checkpoint model '../Output/Models/simple.dnn' Action "train" complete.

While when I try this example with CPU, everything goes fine!!

Starting Epoch 1: learning rate per sample = 0.004000 effective momentum = 0.900000 momentum as time constant = 474.6 samples

Starting minibatch loop. Epoch[ 1 of 50]-Minibatch[ 1- 10]: CrossEntropyWithSoftmax = 0.69665302 * 500; EvalClassificationError = 0.54200000 * 500; time = 0.2479s; samplesPerSecond = 2016.9 Epoch[ 1 of 50]-Minibatch[ 11- 20]: CrossEntropyWithSoftmax = 0.69929645 * 500; EvalClassificationError = 0.49400000 * 500; time = 0.1463s; samplesPerSecond = 3418.1 Epoch[ 1 of 50]-Minibatch[ 21- 30]: CrossEntropyWithSoftmax = 0.69504810 * 500; EvalClassificationError = 0.49800000 * 500; time = 0.0438s; samplesPerSecond = 11417.6 Epoch[ 1 of 50]-Minibatch[ 31- 40]: CrossEntropyWithSoftmax = 0.69561816 * 500; EvalClassificationError = 0.53000000 * 500; time = 0.0570s; samplesPerSecond = 8778.6 Epoch[ 1 of 50]-Minibatch[ 41- 50]: CrossEntropyWithSoftmax = 0.69478809 * 500; EvalClassificationError = 0.50200000 * 500; time = 0.0347s; samplesPerSecond = 14423.8 ... econd = 10230.8 Epoch[50 of 50]-Minibatch[ 141- 150, 75.00%]: CrossEntropyWithSoftmax = 0.14025708 * 500; EvalClassificationError = 0.06000000 * 500; time = 0.0379s; samplesPerSecond = 13197.1 Epoch[50 of 50]-Minibatch[ 151- 160, 80.00%]: CrossEntropyWithSoftmax = 0.13252783 * 500; EvalClassificationError = 0.06000000 * 500; time = 0.0782s; samplesPerSecond = 6394.8 Epoch[50 of 50]-Minibatch[ 161- 170, 85.00%]: CrossEntropyWithSoftmax = 0.15938647 * 500; EvalClassificationError = 0.08000000 * 500; time = 0.0341s; samplesPerSecond = 14679.5 Epoch[50 of 50]-Minibatch[ 171- 180, 90.00%]: CrossEntropyWithSoftmax = 0.15857935 * 500; EvalClassificationError = 0.06800000 * 500; time = 0.0692s; samplesPerSecond = 7225.4 Epoch[50 of 50]-Minibatch[ 181- 190, 95.00%]: CrossEntropyWithSoftmax = 0.18127832 * 500; EvalClassificationError = 0.08400000 * 500; time = 0.0270s; samplesPerSecond = 18540.5 Epoch[50 of 50]-Minibatch[ 191- 200, 100.00%]: CrossEntropyWithSoftmax = 0.13516382 * 500; EvalClassificationError = 0.07200000 * 500; time = 0.0752s; samplesPerSecond = 6652.7 Finished Epoch[50 of 50]: [Training] CrossEntropyWithSoftmax = 0.15416960 * 10000; EvalClassificationError = 0.07400000 * 10000; totalSamplesSeen = 500000; learningRatePerSample = 0.001; epochTime=1.15305s SGD: Saving checkpoint model '../Output/Models/simple.dnn' Action "train" complete.

I also run some of my own examples for speech recognition and have the same issue. Please inform me about this problem and its solution.

regards

I think you might need 3.0 compute capacity card, see #591 , #615

jotarun avatar Oct 17 '16 09:10 jotarun

Yes, there is a bug in NVidia's JITter. However, CNTK should catch this by now. You may want to upgrade to a latest binary.

frankseide avatar Oct 17 '16 15:10 frankseide