CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Issue with running Tutorial2 MNIST CNN

Open leoStark1 opened this issue 10 years ago • 5 comments

Hi Guys,

I tried to run the included MNIST example from the cpu_only x64 binary distribution and got the following error. I didn't change anything and just executed the command as suggested (cntk configFile=../Config/02_Convolution.cntk).

EXCEPTION occurred: MBLayout: Attempting to read out flags, but only only 0 out of 32 frames have been defined.

[CALL STACK] > 00007FF76C345840 (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C373D6B (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C312ED6 (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C485950 (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C484EBD (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C3E934C (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C43F0BC (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C43994A (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C436CE8 (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C3F1736 (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C343466 (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C308AC9 (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C3091EA (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C309491 (SymFromAddr() error: Attempt to access invalid address.) - 00007FF76C4F9ED3 (SymFromAddr() error: Attempt to access invalid address.) - BaseThreadInitThunk

It executed fine for sometime so I'll include the output just before this error occurred.

SGD: Saving checkpoint model '../Output/Models/02_Convolution.5'

Starting Epoch 6: learning rate per sample = 0.009375 effective momentum = 0.000000 momentum as time constant = 0.0 samples starting epoch 5 at record count 300000, and file position 0 already there from last epoch

Starting minibatch loop. RandomOrdering: 11687 retries for 60000 elements (19.5%) to ensure window condition RandomOrdering: recached sequence for seed 5: 28111, 9437, ... Epoch[ 6 of 15]-Minibatch[ 1- 500, 26.67%]: SamplesSeen = 16000; TrainLossPerSample = 0.04917507; EvalErr[0]PerSample = 0.01462500; TotalTime = 37.2061s; SamplesPerSecond = 430.0 Epoch[ 6 of 15]-Minibatch[ 501-1000, 53.33%]: SamplesSeen = 16000; TrainLossPerSample = 0.04075390; EvalErr[0]PerSample = 0.01218750; TotalTime = 31.0648s; SamplesPerSecond = 515.1 Epoch[ 6 of 15]-Minibatch[1001-1500, 80.00%]: SamplesSeen = 16000; TrainLossPerSample = 0.04242500; EvalErr[0]PerSample = 0.01375000; TotalTime = 31.6338s; SamplesPerSecond = 505.8 Finished Epoch[ 6 of 15]: [Training Set] TrainLossPerSample = 0.044394279; TotalSamplesSeen = 360000; EvalErrPerSample = 0.013783333; AvgLearningRatePerSample = 0.0093750004; EpochTime=128.466 SGD: Saving checkpoint model '../Output/Models/02_Convolution.6'

Starting Epoch 7: learning rate per sample = 0.009375 effective momentum = 0.000000 momentum as time constant = 0.0 samples starting epoch 6 at record count 360000, and file position 0 already there from last epoch

Starting minibatch loop. RandomOrdering: 11968 retries for 60000 elements (19.9%) to ensure window condition RandomOrdering: recached sequence for seed 6: 17159, 12122, ...

Any help is very much appreciated!

leoStark1 avatar May 17 '16 04:05 leoStark1

Hello, Does it happen every time you run the sample or it's intermittent? Any chance you can build the latest version from master and try again?

Alexey-Kamenev avatar May 17 '16 16:05 Alexey-Kamenev

Hi Alexey,

Yeah it happens every time I run the example. I'll try to rebuild from source and get back to you.

Thanks a lot!

leoStark1 avatar May 17 '16 22:05 leoStark1

Hello, Can you try disabling pre-fetching in the reader? Find this in 02_Convolution.cntk:

prefetch=true

and replace with this:

prefetch=false

Alexey-Kamenev avatar May 18 '16 17:05 Alexey-Kamenev

(This change has now also been integrated into master, 512216d)

mahilleb-msft avatar May 18 '16 19:05 mahilleb-msft

Hi Alexey and Mahilleb, Thanks for the replies and sorry about the delay in getting back. This solved the issue for me. Thanks again!

leoStark1 avatar Jun 05 '16 00:06 leoStark1