message: add graph freezing command to main
diff: @@ -263,8 +263,18 @@ def convert(load_file, dest_file):
  tf.reset_default_graph()
  +def export_graph(load_file, dest_dir):
  + """ Loads a network and serializes just the inference parts for use by e.g. the C++ binary """
  + n = dual_net.DualNetwork(load_file)
  + out_graph = tf.graph_util.convert_variables_to_constants(
  + n.sess, n.sess.graph.as_graph_def(), ["policy_output", "value_output"])
  + basename = os.path.basename(load_file)
  + with open(os.path.join(dest_dir, basename + '.pb'), 'wb') as f:
  + f.write(out_graph.SerializeToString())
  +
  +
  parser = argparse.ArgumentParser()
  -argh.add_commands(parser, [gtp, bootstrap, train,
  +argh.add_commands(parser, [gtp, bootstrap, train, export_graph,
  selfplay, gather, evaluate, validate, convert])
  if __name__ == '__main__':
  