Skip to content
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

Update super_resolution.ipynb to resize the input tensor #467

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pjpratik
Copy link

The input tensor to the interpreter needs to be resized to take 1x50x50x3 image else it is throwing the dimension mismatch error.

Thanks.

The input tensor to the interpreter needs to be resized to take `1x50x50x3` image else it is throwing the dimension mismatch error.

Thanks.
@google-ml-butler google-ml-butler bot added the size:XS CL Change Size: Extra Small label Jul 21, 2023
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@khanhlvg
Copy link
Member

khanhlvg commented Jul 25, 2023

@windmaple Can you take a look?

@windmaple
Copy link

@pjpratik
The test image is actually 50x50. Why do you need to resize it again? Unless you are using a diff test img?

@pjpratik
Copy link
Author

Hi @windmaple

The example when run on colab with latest stable version TF 2.13 runs into an error. Please find this gist.

The converted tflite model has input shape of [1,1,1,3], and the setting the input shape via concrete function is not considered.

Thanks.

Copy link

@windmaple windmaple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be a bug during conversion; it's unclear to me why the input shape is ignored during conversion.

For now manually resizing the input tensor is a valid workaround.

@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull labels Jul 27, 2023
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants