TFLite Conversion of db_resnet50 #1255
Unanswered
SavvaVyatkin
asked this question in
Q&A
Replies: 1 comment
-
Hi @SavvaVyatkin 👋🏼 , seems you was able to solve it on your own ? :) Sorry for the confusion, I know there is another page in the documentation about the TFLite export. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do I convert the db_resnet50 to tflite? I have only been able to find instructions for how to convert a single layer to tflite, which is not very useful.
Furthermore, when I try to convert the db_resnet50 in this fashion
`import tensorflow as tf
from doctr.models import db_resnet50
model = db_resnet50(pretrained=True)
tf.saved_model.save(model, 'db_resnet50')
imported = tf.saved_model.load('db_resnet50')
print(imported.signatures)
converter = tf.lite.TFLiteConverter.from_saved_model('db_resnet50')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_quant_model = converter.convert()
tflite_quant_model.save('db_resnet50.tflite')
`
I get
ValueError: Only support at least one signature key.
And printing out the signatures gets
_SignatureMap({})
Beta Was this translation helpful? Give feedback.
All reactions