message: rename export to freeze for clarity.  add calls at the end of bootstrap and train
diff: @@ -92,6 +92,7 @@ def bootstrap(
  _ensure_dir_exists(os.path.dirname(model_save_path))
  dual_net.bootstrap(working_dir)
  dual_net.export_model(working_dir, model_save_path)
  + freeze_graph(model_save_path)
  def train(
  @@ -107,6 +108,7 @@ def train(
  with timer("Training"):
  dual_net.train(working_dir, tf_records, generation_num)
  dual_net.export_model(working_dir, model_save_path)
  + freeze_graph(model_save_path)
  def validate(
  @@ -263,18 +265,17 @@ def convert(load_file, dest_file):
  tf.reset_default_graph()
  -def export_graph(load_file, dest_dir):
  +def freeze_graph(load_file):
  """ 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:
  + with open(os.path.join(load_file + '.pb'), 'wb') as f:
  f.write(out_graph.SerializeToString())
  parser = argparse.ArgumentParser()
  -argh.add_commands(parser, [gtp, bootstrap, train, export_graph,
  +argh.add_commands(parser, [gtp, bootstrap, train, freeze_graph,
  selfplay, gather, evaluate, validate, convert])
  if __name__ == '__main__':
  