CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Values always zero while training on GPU

Open madingo87 opened this issue 10 years ago • 4 comments

I have a Problem with training networks on GPU.

When i run (for example) the 3Classes_bs.cntk from the tutorial the evaluation and criterion-values are always 0. Training with CPU works just fine. It says in the log that GPU 0 is locked for use.

CNTKCommandTrainBegin:

Train LockDevice: Locked GPU 0 to test availability. LockDevice: Unlocked GPU 0 after testing. LockDevice: Locked GPU 0 for exclusive use.

Creating virgin network.

Post-processing network...

3 roots: ce = CrossEntropyWithSoftmax() errs = ErrorPrediction() z = Plus()

and here is a snippet from the log while training

Starting Epoch 4: learning rate per sample = 0.040000 effective momentum = 0.900000 momentum as time constant = 237.3 samples BlockRandomizer::StartEpoch: epoch 3: frames [3000..4000](first sequence at sample 3000), data subset 0 of 1

Starting minibatch loop. Finished Epoch[ 4 of 50]: [Training] ce = 0.00000000 * 1000; errs = 0.000% * 1000; totalSamplesSeen = 4000; learningRatePerSample = 0.039999999; epochTime=0.033761s SGD: Saving checkpoint model 'Models/MC.dnn.4'

Starting Epoch 5: learning rate per sample = 0.040000 effective momentum = 0.900000 momentum as time constant = 237.3 samples BlockRandomizer::StartEpoch: epoch 4: frames [4000..5000](first sequence at sample 4000), data subset 0 of 1

Starting minibatch loop. Finished Epoch[ 5 of 50]: [Training] ce = 0.00000000 * 1000; errs = 0.000% * 1000; totalSamplesSeen = 5000; learningRatePerSample = 0.039999999; epochTime=0.034928s SGD: Saving checkpoint model 'Models/MC.dnn.5'

Starting Epoch 6: learning rate per sample = 0.040000 effective momentum = 0.900000 momentum as time constant = 237.3 samples BlockRandomizer::StartEpoch: epoch 5: frames [5000..6000](first sequence at sample 5000), data subset 0 of 1

Starting minibatch loop. Finished Epoch[ 6 of 50]: [Training] ce = 0.00000000 * 1000; errs = 0.000% * 1000; totalSamplesSeen = 6000; learningRatePerSample = 0.039999999; epochTime=0.034674s SGD: Saving checkpoint model 'Models/MC.dnn.6'

what am i doing wrong? what do i have to check or do i miss? Thanks for any hint!

madingo87 avatar Jun 20 '16 17:06 madingo87

most likely unsupported GPU. See closed question #591

jotarun avatar Jun 21 '16 01:06 jotarun

Thanks a lot! I couln't find this one... I will try to confirm that as soon as possible!

madingo87 avatar Jun 21 '16 14:06 madingo87

Yes. The message "Locked GPU 0" means that you are running on the GPU 0, which has been exclusively locked for this CNTK process. We are planning to add a runtime check to CNTK so that it no longer even starts on unsupported GPUs, to avoid this confusion in the future.

frankseide avatar Jun 21 '16 15:06 frankseide

Okay, i found out, that my GPU has the Compute Capability 2.1 I thought that could be the problem, but i was indeed confused by the log saying "Locked GPU 0 for exclusive use". (I thought maybe thats the first index of the GPUs)

Thanks for the awesome support here! Highly appreciate it!

madingo87 avatar Jun 22 '16 14:06 madingo87