Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 90c422f

Browse files
Googlerscottamain
Googler
authored andcommitted
Update TFLite concrete function conversion codes to have the associated
trackable object. Providing trackable objects is now recommended for the users. This makes the concrete function conversion API be based on the new SavedModel importer, which will enable new TensorFlow Lite features including variable support, resources and variant tensor, and signature concept. PiperOrigin-RevId: 410120653
1 parent bd3a237 commit 90c422f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎fix_conversion_issues_ptq_tf2.ipynb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@
451451
"imported = tf.saved_model.load(save_path)\n",
452452
"concrete_func = imported.signatures[\"serving_default\"]\n",
453453
"concrete_func.inputs[0].set_shape([1, 224, 224, 3])\n",
454-
"converter = tf.lite.TFLiteConverter.from_concrete_functions([concrete_func])"
454+
"converter = tf.lite.TFLiteConverter.from_concrete_functions([concrete_func], imported)"
455455
]
456456
},
457457
{
@@ -576,7 +576,7 @@
576576
"imported = tf.saved_model.load(\"imagenet_inception_v2_classification_4\")\n",
577577
"concrete_func = imported.__call__.get_concrete_function(\n",
578578
" tf.TensorSpec([1, 224, 224, 3]))\n",
579-
"converter = tf.lite.TFLiteConverter.from_concrete_functions([concrete_func])"
579+
"converter = tf.lite.TFLiteConverter.from_concrete_functions([concrete_func], imported)"
580580
]
581581
},
582582
{

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /