MobileNet icon indicating copy to clipboard operation
MobileNet copied to clipboard

Loss does not converge

Open LANMNG opened this issue 6 years ago • 4 comments

I train mobilenet_v1 for many times, but the loss doesn`t down to 1.xxx, but aways be 2.xxx, and the accuracy is just about 54%,what is wrong?

LANMNG avatar Jun 28 '18 08:06 LANMNG

when i run bash ./scripts/train_mobilenet_on_imagenet.sh, i met the bug:WARNING:tensorflow:From train_image_classifier.py:415: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version. Instructions for updating: Please switch to tf.train.create_global_step did you got this bug? hope you can give some help ....thanks!!!

jiachen0212 avatar Jul 11 '18 11:07 jiachen0212

you may update your version of tensorflow and it would not have any influence on your experiment. @jiachen0212 and you can change the optimizer to rmsprop.

LANMNG avatar Jul 11 '18 11:07 LANMNG

Is this the problem solved?

jiesonshan avatar Oct 29 '18 08:10 jiesonshan

I also encountered a similar problem. But I already know where I am wrong. In this code, "slim.batch_norm" have been used, we should define the optimizer as follows:

  update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
  train_op = optimizer.minimize(loss)
  train_op = tf.group([train_op, update_ops])

Please refer to my summary:https://github.com/JiaShengLiu111/Deeplearning/blob/master/Tensorflow%E4%B8%ADbatch_normalization%E4%BD%BF%E7%94%A8%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9.md

JiaShengLiu111 avatar Mar 30 '19 06:03 JiaShengLiu111