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

Unrecognized keyword arguments passed to Conv2D #181

Open
susupera opened this issue Oct 9, 2024 · 2 comments
Open

Unrecognized keyword arguments passed to Conv2D #181

susupera opened this issue Oct 9, 2024 · 2 comments

Comments

@susupera
Copy link

susupera commented Oct 9, 2024

ValueError: Unrecognized keyword arguments passed to Conv2D: {'weights': [array([[[[-0.12115334, -0.29564023, -0.3127334 , ..., -0.18404537,
0.12711518, -0.48213908]],

    [[ 0.11699861, -0.7016729 ,  0.18963906, ...,  0.11501631,
      -0.07108907,  0.19613937]],

    [[-0.023098  , -0.03203333,  0.15857543, ...,  0.02452009,
      -0.3097593 , -0.0880196 ]],

please help.

@tj12323
Copy link

tj12323 commented Oct 19, 2024

I have the same error.

@virtualphoton
Copy link

Could be because the package has imported the newer version of keras - then in traceback there would be path pointing to keras library, sth like lib/python3.10/site-packages/keras/src/layers/convolutional/depthwise_conv2d.py.

Install legacy keras: pip install tf-keras
Use this before importing tensorflow:

import os
os.environ['TF_USE_LEGACY_KERAS'] = "1"

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