Skip to content

Commit

Permalink
SavedModel TF Serve Fix
Browse files Browse the repository at this point in the history
Fix for #7205 proposed by @tylertroy
  • Loading branch information
glenn-jocher committed Mar 31, 2022
1 parent df9008e commit 98109b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def export_saved_model(model, im, file, dynamic,
m = m.get_concrete_function(spec)
frozen_func = convert_variables_to_constants_v2(m)
tfm = tf.Module()
tfm.__call__ = tf.function(lambda x: frozen_func(x)[0], [spec])
tfm.__call__ = tf.function(lambda x: frozen_func(x)[:4], [spec])
tfm.__call__(im)
tf.saved_model.save(
tfm,
Expand Down

0 comments on commit 98109b0

Please sign in to comment.