Tencent / PocketFlow

An Automatic Model Compression (AutoMC) framework for developing smaller and faster AI applications.
https://pocketflow.github.io
Other
2.79k stars 490 forks source link

mismatched batch_size_eval and batch_size #283

Closed yuanyuanli85 closed 5 years ago

yuanyuanli85 commented 5 years ago

There is something wroing in calculating the iterations for evaluation. The eval score will be incorrect when batch_size not equal to batch_size_eval.

It should be

nb_iters = int(np.ceil(float(FLAGS.nb_smpls_eval) / FLAGS.batch_size_eval))

while in the code

 nb_iters = int(np.ceil(float(FLAGS.nb_smpls_eval) / FLAGS.batch_size))
jiaxiang-wu commented 5 years ago

Resolved in PR #285. Thanks for pointing it out.