-
Notifications
You must be signed in to change notification settings - Fork 74.2k
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
How to convert a image caption model to tensorflow Lite model?ValueError: Python inputs incompatible with input_signature: #42319
Comments
@DavidInWuhanChina |
The coco2017 dateset is so big(13GB) that I can't put it in the colab.Please tell me How to do next? |
From the error message looks like your have he tf.function expecting first input as int64 while the input is int32. Can you try changing the tf.function to expect int32 instead. Thanks |
I just change the tf.function to int32 as below: |
@karimnosseir to follow up comments again. cc @abattery |
@DavidInWuhanChina Could you please refer to this link for avoiding the side effects. Please try to wrap the TF model only in the function to export to TF Lite with the latest TF version 2.11, instead of everything including preprocessing and postprocessing. Thank you! |
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you. |
Closing as stale. Please reopen if you'd like to work on this further. |
System information
-TensorFlow version:2.3.0
I am following this example:https://www.tensorflow.org/tutorials/text/image_captioning?hl=en
It is working as it should be and saving checkpoints and I want to now convert this to a TF Lite model.
Here is the Link of full convert code:https://colab.research.google.com/drive/1GJkGcwWvDAWMooTsECzuSRUSPbirADhb?usp=sharing
Here is the Link of full train code:
https://colab.research.google.com/drive/1X2d9WW1EMEzN8Rgva3rtjevP0T_jFccj?usp=sharing
I also following the isssue#32999
Here is what I am running to save and them convert the inference graph:
but I get this error
Encoder Model:
Decoder model:
The text was updated successfully, but these errors were encountered: