Merge pull request #1922 from nicolaspanel/master

Allow custom export_batch_size (Fixes #1920)
This commit is contained in:
Reuben Morais 2019-03-01 11:14:42 -03:00 committed by GitHub
commit 11ced3dd0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -749,7 +749,7 @@ def export():
tf.reset_default_graph()
session = tf.Session(config=Config.session_config)
inputs, outputs, _ = create_inference_graph(batch_size=1, n_steps=FLAGS.n_steps, tflite=FLAGS.export_tflite)
inputs, outputs, _ = create_inference_graph(batch_size=FLAGS.export_batch_size, n_steps=FLAGS.n_steps, tflite=FLAGS.export_tflite)
input_names = ",".join(tensor.op.name for tensor in inputs.values())
output_names_tensors = [ tensor.op.name for tensor in outputs.values() if isinstance(tensor, Tensor) ]
output_names_ops = [ tensor.name for tensor in outputs.values() if isinstance(tensor, Operation) ]