Tensorflow object detection API not displaying global steps

我是研究僧i 提交于 2019-12-09 15:21:22

问题


I am new here. I recently started working with object detection and decided to use the Tensorflow object detection API. But, when I start training the model, it does not display the global step like it should, although it's still training in the background.

Details: I am training on a server and accessing it using OpenSSH on Windows. I trained a custom dataset, by collecting pictures and labeling them. I trained it using model_main.py. Also, until a couple of months back, the API was a little different, and only recently they changed to the latest version. For instance, earlier it used to use train.py for training, instead of model_main.py. All the online tutorial I can find use train.py, so it might be a problem with the latest commit. But I don't find anyone else fining this problem.

Thanks in advance!


回答1:


Add tf.logging.set_verbosity(tf.logging.INFO) after the import section of the model_main.py script. It will display a summary after every 100th step.




回答2:


As Thommy257 suggested, adding tf.logging.set_verbosity(tf.logging.INFO) after the import section of model_main.py prints the summary after every 100 steps by default.

Further, to specify the frequency of the summary, change

config = tf.estimator.RunConfig(model_dir=FLAGS.model_dir)

to

config = tf.estimator.RunConfig(model_dir=FLAGS.model_dir, log_step_count_steps=k)

where it will print after every k steps.




回答3:


Regarding the recent change to model_main , the previous version is available at the folder "legacy". I use train.py and eval.py from this legacy folder with the same functionality as before.



来源:https://stackoverflow.com/questions/52016255/tensorflow-object-detection-api-not-displaying-global-steps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!