Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #447: Changed format for exporting models to MetaGraphDef for Tensorflow #455

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Export support for json2pbtxt.py
abhigyan7 committed Nov 19, 2018
commit ad2105097ad9d26416c85d6f4be680086a62a2d7
6 changes: 3 additions & 3 deletions tensorflow_app/views/json2pbtxt.py
Original file line number Diff line number Diff line change
@@ -30,6 +30,6 @@
lrn = imp.load_source('LRN', BASE_DIR + '/keras_app/custom_layers/lrn.py')
model = model_from_json(json_str, {'LRN': lrn.LRN})

sess = K.get_session()
tf.train.write_graph(sess.graph.as_graph_def(add_shapes=True), output_fld,
output_file + '.pbtxt', as_text=True)
tf.train.export_meta_graph(
os.path.join(output_fld, output_file + '.meta'),
as_text=True)