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

Input 0 of layer "model" is incompatible with the layer #123

Open
Matteo-0 opened this issue Apr 26, 2022 · 3 comments
Open

Input 0 of layer "model" is incompatible with the layer #123

Matteo-0 opened this issue Apr 26, 2022 · 3 comments

Comments

@Matteo-0
Copy link

Hello,
I am trying to use this code to be able to implement a neural network capable to recognize standing and laying down positions.
I have gathered my dataset of images with their bounding box but when I try to use this code I get the following error:

"ValueError: Input 0 of layer "model" is incompatible with the layer: expected shape=(None, None, None, 3), found shape=(1, 3, 416, 554)"

I do not understand what is the problem with the shapes since they both have length four. Does anyone encountered this problem before and was able to solve it?

Any help is appreciated, Thanks!

@h-arslan
Copy link

Hello, I don't know how related they are but I solved the same kind of error by rebuilding the environment. I was using python 3.10 and latest versions of tensorflow and keras. After getting error I downgraded python to 3.6 and downgraded tensorflow to version 1.14.0 and keras to 2.1.6, problem gone.
Hope it works!

@imon134
Copy link

imon134 commented Mar 9, 2023

Hello, I don't know how related they are but I solved the same kind of error by rebuilding the environment. I was using python 3.10 and latest versions of tensorflow and keras. After getting error I downgraded python to 3.6 and downgraded tensorflow to version 1.14.0 and keras to 2.1.6, problem gone. Hope it works!

how did you downgrade tensorflow to that version

@h-arslan
Copy link

h-arslan commented Mar 9, 2023

Running the commands pip uninstall tensorflow, pip uninstall keras
and pip install tensorflow==1.14.0 and pip install keras==2.1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants