在分类任务训练,第一个batch的准确率老是很低,这个是什么原因呢?
Created by: yeyupiaoling
从下面的日志中可以看出,每个pass的第一个batch的准确率都0,这是一个什么情况,如果解决呢?
Pass:0, Batch:0, Cost:3.19092, Accuracy:0.00000
Pass:0, Batch:100, Cost:0.52620, Accuracy:0.76562
Pass:0, Batch:200, Cost:0.41754, Accuracy:0.78906
Pass:0, Batch:300, Cost:1.33604, Accuracy:0.53125
Pass:0, Batch:400, Cost:1.25062, Accuracy:0.56250
Pass:0, Batch:500, Cost:0.55799, Accuracy:0.72656
Pass:0, Batch:600, Cost:0.52848, Accuracy:0.78906
Pass:0, Batch:700, Cost:0.59883, Accuracy:0.67969
Pass:0, Batch:800, Cost:1.57171, Accuracy:0.42188
Test:0, Cost:9.78627, Accuracy:0.08331
Pass:1, Batch:0, Cost:10.21090, Accuracy:0.00000
Pass:1, Batch:100, Cost:0.43346, Accuracy:0.82031
Pass:1, Batch:200, Cost:0.38701, Accuracy:0.85156
Pass:1, Batch:300, Cost:1.22600, Accuracy:0.47656
Pass:1, Batch:400, Cost:1.29617, Accuracy:0.54688
Pass:1, Batch:500, Cost:0.52815, Accuracy:0.78125
Pass:1, Batch:600, Cost:0.52131, Accuracy:0.75781
Pass:1, Batch:700, Cost:0.51254, Accuracy:0.75000
Pass:1, Batch:800, Cost:2.02061, Accuracy:0.37500
Test:1, Cost:10.59021, Accuracy:0.08632
Pass:2, Batch:0, Cost:9.62461, Accuracy:0.00000
Pass:2, Batch:100, Cost:0.47100, Accuracy:0.78125
Pass:2, Batch:200, Cost:0.52279, Accuracy:0.71094
Pass:2, Batch:300, Cost:1.06837, Accuracy:0.55469
Pass:2, Batch:400, Cost:1.21261, Accuracy:0.52344
Pass:2, Batch:500, Cost:0.59388, Accuracy:0.69531
Pass:2, Batch:600, Cost:0.59026, Accuracy:0.68750
Pass:2, Batch:700, Cost:0.53604, Accuracy:0.71094
Pass:2, Batch:800, Cost:1.46770, Accuracy:0.45312
Test:2, Cost:6.30135, Accuracy:0.08281
训练环境: paddlepaddle 1.1.0 python 3.5 4 个CPU