added an argument to choose the final export model name

This commit is contained in:
PedroDKE 2020-01-25 12:30:07 +01:00
parent a9855f1e4e
commit 3e349497ed
2 changed files with 2 additions and 1 deletions

View File

@ -812,7 +812,7 @@ def export():
checkpoint = tf.train.get_checkpoint_state(FLAGS.checkpoint_dir)
checkpoint_path = checkpoint.model_checkpoint_path
output_filename = 'output_graph.pb'
output_filename = FLAGS.export_name +'.pb'
if FLAGS.remove_export:
if os.path.isdir(FLAGS.export_dir):
log_info('Removing old export')

View File

@ -110,6 +110,7 @@ def create_flags():
f.DEFINE_integer('n_steps', 16, 'how many timesteps to process at once by the export graph, higher values mean more latency')
f.DEFINE_string('export_language', '', 'language the model was trained on e.g. "en" or "English". Gets embedded into exported model.')
f.DEFINE_boolean('export_zip', False, 'export a TFLite model and package with LM and info.json')
f.DEFINE_string('export_name','output_graph', 'name for the export model')
# Reporting