Tensorflow程序的基本框架

Tensorflow程序的基本框架

import tensorflow as tf
FLAGS = tf.app.flags.FLAGS
def main(_):
  if not FLAGS.output_file:
    raise ValueError('You must supply the path to save to with --output_file')
  tf.logging.set_verbosity(tf.logging.INFO)
  with tf.Graph().as_default() as graph:
    if FLAGS.quantize:
      tf.contrib.quantize.create_eval_graph()

def func():
	#function content

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

posted @ 2018-12-21 17:31  herryzz  阅读(275)  评论(0编辑  收藏  举报