ResNet Error increasing from 58% to 94% abruptly at Epoch 50 (each Epoch has 50K images)
I am training ResNet-34 with images(63 Million). The images belong to 55 classes. Everything works well till Epoch 50 (except for job getting killed and to be resumed manually multiple times), when abrupty Error shoots to 94% and stays there. I use this command to train it: nohup mpirun -np 4 cntk configFile=ResNet_34.cntk configName=ResNet34 parallelTrain=true numCPUThreads=5 &
SGD config is: SGD=[ epochSize=50000 minibatchSize=32 # Note that learning rates are 10x more than in the paper due to a different # momentum update rule in CNTK: v{t + 1} = lr_(1 - momentum)_g{t + 1} + momentum_v{t} learningRatesPerMB=1.0_95:0.1_95:0.01 #learningRatesPerMB=1.0_35:0.1*35:0.01 momentumPerMB=0.9 maxEpochs=10000 gradUpdateType=None L2RegWeight=0.0001 dropoutRate=0
ParallelTrain=[
parallelizationMethod=DataParallelSGD
distributedMBReading=true
parallelizationStartEpoch=1
DataParallelSGD=[
gradientBits=32
]
]
]
Here are the logs: 184 out of 311 nodes do not share the minibatch layout with the input data.
Post-processing network complete.
SGD using GPU 1.
Training criterion node(s): CE = CrossEntropyWithSoftmax
Evaluation criterion node(s): Err = ErrorPrediction
Allocating matrices for forward and/or backward propagation. No PreCompute nodes found, skipping PreCompute step Warning: checkpoint file is missing. learning parameters will be initialized from 0 Set Max Temp Mem Size For Convolution Nodes to 0 samples. Starting Epoch 48: learning rate per sample = 0.031250 effective momentum = 0.900000 momentum as time constant = 303.7 samples
Starting minibatch loop, DataParallelSGD training (MyRank = 1, NumNodes = 4, NumGradientBits = 32), distributed reading is ENABLED. Epoch[48 of 10000]-Minibatch[ 1- 500, 32.00%]: SamplesSeen = 16000; TrainLossPerSample = 1.99818558; EvalErr[0]PerSample = 0.58706250; TotalTime = 323.9268s; SamplesPerSecond = 49.4 Epoch[48 of 10000]-Minibatch[ 501-1000, 64.00%]: SamplesSeen = 16000; TrainLossPerSample = 1.97986378; EvalErr[0]PerSample = 0.58212500; TotalTime = 319.7465s; SamplesPerSecond = 50.0 Epoch[48 of 10000]-Minibatch[1001-1500, 96.00%]: SamplesSeen = 16000; TrainLossPerSample = 1.96691756; EvalErr[0]PerSample = 0.57987500; TotalTime = 319.3673s; SamplesPerSecond = 50.1 Finished Epoch[48 of 10000]: [Training Set] TrainLossPerSample = 1.9848937; EvalErrPerSample = 0.58384; AvgLearningRatePerSample = 0.03125; EpochTime=1034.54 Starting Epoch 49: learning rate per sample = 0.031250 effective momentum = 0.900000 momentum as time constant = 303.7 samples
Starting minibatch loop, DataParallelSGD training (MyRank = 1, NumNodes = 4, NumGradientBits = 32), distributed reading is ENABLED. Epoch[49 of 10000]-Minibatch[ 1- 500, 32.00%]: SamplesSeen = 16000; TrainLossPerSample = 1.97326465; EvalErr[0]PerSample = 0.58068750; TotalTime = 320.6905s; SamplesPerSecond = 49.9 Epoch[49 of 10000]-Minibatch[ 501-1000, 64.00%]: SamplesSeen = 16000; TrainLossPerSample = 1.98253651; EvalErr[0]PerSample = 0.58675000; TotalTime = 319.0453s; SamplesPerSecond = 50.1 Epoch[49 of 10000]-Minibatch[1001-1500, 96.00%]: SamplesSeen = 16000; TrainLossPerSample = 1.99787742; EvalErr[0]PerSample = 0.58950000; TotalTime = 318.0490s; SamplesPerSecond = 50.3 Finished Epoch[49 of 10000]: [Training Set] TrainLossPerSample = 1.9830177; EvalErrPerSample = 0.58488; AvgLearningRatePerSample = 0.03125; EpochTime=999.136 Starting Epoch 50: learning rate per sample = 0.031250 effective momentum = 0.900000 momentum as time constant = 303.7 samples
Starting minibatch loop, DataParallelSGD training (MyRank = 1, NumNodes = 4, NumGradientBits = 32), distributed reading is ENABLED. Epoch[50 of 10000]-Minibatch[ 1- 500, 32.00%]: SamplesSeen = 16000; TrainLossPerSample = 1.96691568; EvalErr[0]PerSample = 0.58212500; TotalTime = 319.8961s; SamplesPerSecond = 50.0 Epoch[50 of 10000]-Minibatch[ 501-1000, 64.00%]: SamplesSeen = 16000; TrainLossPerSample = 2.49625343; EvalErr[0]PerSample = 0.67962500; TotalTime = 318.3067s; SamplesPerSecond = 50.3 Epoch[50 of 10000]-Minibatch[1001-1500, 96.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.92631906; EvalErr[0]PerSample = 0.95393750; TotalTime = 320.4950s; SamplesPerSecond = 49.9 Finished Epoch[50 of 10000]: [Training Set] TrainLossPerSample = 2.841549; EvalErrPerSample = 0.74706; AvgLearningRatePerSample = 0.03125; EpochTime=1000.03 Starting Epoch 51: learning rate per sample = 0.031250 effective momentum = 0.900000 momentum as time constant = 303.7 samples
Starting minibatch loop, DataParallelSGD training (MyRank = 1, NumNodes = 4, NumGradientBits = 32), distributed reading is ENABLED. Epoch[51 of 10000]-Minibatch[ 1- 500, 32.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.92036643; EvalErr[0]PerSample = 0.94706250; TotalTime = 323.8657s; SamplesPerSecond = 49.4 Epoch[51 of 10000]-Minibatch[ 501-1000, 64.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.92073940; EvalErr[0]PerSample = 0.95187500; TotalTime = 322.1455s; SamplesPerSecond = 49.7 Epoch[51 of 10000]-Minibatch[1001-1500, 96.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.91648326; EvalErr[0]PerSample = 0.94637500; TotalTime = 321.5602s; SamplesPerSecond = 49.8 Finished Epoch[51 of 10000]: [Training Set] TrainLossPerSample = 3.9194252; EvalErrPerSample = 0.9485; AvgLearningRatePerSample = 0.03125; EpochTime=1009 Starting Epoch 52: learning rate per sample = 0.031250 effective momentum = 0.900000 momentum as time constant = 303.7 samples
Starting minibatch loop, DataParallelSGD training (MyRank = 1, NumNodes = 4, NumGradientBits = 32), distributed reading is ENABLED. Epoch[52 of 10000]-Minibatch[ 1- 500, 32.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.91870739; EvalErr[0]PerSample = 0.95087500; TotalTime = 322.4839s; SamplesPerSecond = 49.6 Epoch[52 of 10000]-Minibatch[ 501-1000, 64.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.92003098; EvalErr[0]PerSample = 0.95568750; TotalTime = 322.7978s; SamplesPerSecond = 49.6 Epoch[52 of 10000]-Minibatch[1001-1500, 96.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.91796795; EvalErr[0]PerSample = 0.95050000; TotalTime = 321.8343s; SamplesPerSecond = 49.7 Finished Epoch[52 of 10000]: [Training Set] TrainLossPerSample = 3.9176459; EvalErrPerSample = 0.9522; AvgLearningRatePerSample = 0.03125; EpochTime=1008.72 Starting Epoch 53: learning rate per sample = 0.031250 effective momentum = 0.900000 momentum as time constant = 303.7 samples
Starting minibatch loop, DataParallelSGD training (MyRank = 1, NumNodes = 4, NumGradientBits = 32), distributed reading is ENABLED. Epoch[53 of 10000]-Minibatch[ 1- 500, 32.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.91457515; EvalErr[0]PerSample = 0.95093750; TotalTime = 323.0997s; SamplesPerSecond = 49.5 Epoch[53 of 10000]-Minibatch[ 501-1000, 64.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.92098622; EvalErr[0]PerSample = 0.95087500; TotalTime = 321.8677s; SamplesPerSecond = 49.7 Epoch[53 of 10000]-Minibatch[1001-1500, 96.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.92076807; EvalErr[0]PerSample = 0.94768750; TotalTime = 323.2332s; SamplesPerSecond = 49.5 Finished Epoch[53 of 10000]: [Training Set] TrainLossPerSample = 3.9185902; EvalErrPerSample = 0.95022; AvgLearningRatePerSample = 0.03125; EpochTime=1009.53 Starting Epoch 54: learning rate per sample = 0.031250 effective momentum = 0.900000 momentum as time constant = 303.7 samples
Starting minibatch loop, DataParallelSGD training (MyRank = 1, NumNodes = 4, NumGradientBits = 32), distributed reading is ENABLED. Epoch[54 of 10000]-Minibatch[ 1- 500, 32.00%]: SamplesSeen = 16000; TrainLossPerSample = 3.91580447; EvalErr[0]PerSample = 0.94787500; TotalTime = 322.6660s; SamplesPerSecond = 49.6
Hello, It would be very hard to tell why this is happening without access to the data etc. I would suggest trying different hyper-parameter values or training on a smaller subset of data first.