Skip to content

Commit

Permalink
Fix cmd string on tfjs export (#6243)
Browse files Browse the repository at this point in the history
* Fix cmd string on tfjs export

* Cleanup

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
Jinwoong Yoo and glenn-jocher committed Jan 10, 2022
1 parent 6865d19 commit 9b13a59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions export.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ def export_tfjs(keras_model, im, file, prefix=colorstr('TensorFlow.js:')):
f_pb = file.with_suffix('.pb') # *.pb path
f_json = f + '/model.json' # *.json path

cmd = f"tensorflowjs_converter --input_format=tf_frozen_model " \
f"--output_node_names='Identity,Identity_1,Identity_2,Identity_3' {f_pb} {f}"
cmd = f'tensorflowjs_converter --input_format=tf_frozen_model ' \
f'--output_node_names="Identity,Identity_1,Identity_2,Identity_3" {f_pb} {f}'
subprocess.run(cmd, shell=True)

json = open(f_json).read()
Expand Down

0 comments on commit 9b13a59

Please sign in to comment.