at local level it successfully runs but when deployed an error appears like this ValueError: Layer ‘conv2d_4’ expected 2 variables, but received 0 variables during loading. Expected: [‘conv2d_4/kernel:0’, ‘conv2d_4/bias:0’]
repo link:
at local level it successfully runs but when deployed an error appears like this ValueError: Layer ‘conv2d_4’ expected 2 variables, but received 0 variables during loading. Expected: [‘conv2d_4/kernel:0’, ‘conv2d_4/bias:0’]
repo link:
Hi @8shagrid
Have you tried matching the exact version number for libraries used in the app on your local computer versus on the deployed server.
pip freeze
The same is happening to me
ValueError: Layer 'conv2d' expected 2 variables, but received 0 variables during loading. Expected: ['conv2d/kernel:0', 'conv2d/bias:0']
I trained the model on colab(for faster runtime) but after downloading the model and running it on my local machine it gives this.
my best guess is there is a compatibility issue between colab and my local machine, i guess ill retrain on my local machine even tough it would take 30 min to an hour
Saving broken between tf.keras and Keras Core · Issue #855 · keras-team/keras-core · GitHub
Nevermind its fixed here, if you are using an earlier model of keras use get_weights and set_weights to get it fixed
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.