首页 > 移动平台 > 详细

if __name__ == "__main__": tf.app.run()

时间:2018-06-13 11:13:05      阅读:675      评论:0      收藏:0      [点我收藏+]
if __name__ == "__main__": means current file is executed under a shell instead of imported as a module.
the job of tf.app.run() is to first set the global flags for later usage like

    from tensorflow.python.platform import flags

    f = flags.FLAGS

and then run your custom main function with a set of arguments.

if __name__ == "__main__": tf.app.run()

原文:https://www.cnblogs.com/qingliu411/p/9175896.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!