if __name__ == "__main__": tf.app.run()
Posted qingliu411
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了if __name__ == "__main__": tf.app.run()相关的知识,希望对你有一定的参考价值。
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()的主要内容,如果未能解决你的问题,请参考以下文章
if __name__ == "__main__": 做啥?
unittest: if __name__ == "__main__" 理解
python if __name__ == "__main__"
if __name__ == "__main__" 语法错误