Skip to content

Commit 857b9d4

Browse files
Add expected outputs in Tensorflow SavedModel guide.
PiperOrigin-RevId: 721175407
1 parent 3931d31 commit 857b9d4

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

site/en/guide/saved_model.ipynb

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@
639639
"outputs": [],
640640
"source": [
641641
"imported_with_signatures = tf.saved_model.load(module_with_signature_path)\n",
642-
"list(imported_with_signatures.signatures.keys())\n"
642+
"list(imported_with_signatures.signatures.keys()) # [\"serving_default\"]"
643643
]
644644
},
645645
{
@@ -674,8 +674,12 @@
674674
},
675675
"outputs": [],
676676
"source": [
677-
"imported_with_multiple_signatures = tf.saved_model.load(module_multiple_signatures_path)\n",
678-
"list(imported_with_multiple_signatures.signatures.keys())"
677+
"imported_with_multiple_signatures = tf.saved_model.load(\n",
678+
" module_multiple_signatures_path\n",
679+
")\n",
680+
"list(\n",
681+
" imported_with_multiple_signatures.signatures.keys()\n",
682+
") # [\"serving_default\", \"array_input\"]"
679683
]
680684
},
681685
{
@@ -720,7 +724,9 @@
720724
"outputs": [],
721725
"source": [
722726
"imported_with_output_name = tf.saved_model.load(module_output_path)\n",
723-
"imported_with_output_name.signatures['serving_default'].structured_outputs"
727+
"imported_with_output_name.signatures[\n",
728+
" 'serving_default'\n",
729+
"].structured_outputs # {'custom_output_name': TensorSpec(shape=<unknown>, dtype=tf.float32, name='custom_output_name')}"
724730
]
725731
},
726732
{

0 commit comments

Comments
 (0)