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

No compatible with new version of tensorflow #260

Open
KyuDan1 opened this issue Nov 30, 2024 · 1 comment
Open

No compatible with new version of tensorflow #260

KyuDan1 opened this issue Nov 30, 2024 · 1 comment

Comments

@KyuDan1
Copy link

KyuDan1 commented Nov 30, 2024

In recognition.py file,
line 277~283

locnet_y = keras.layers.Dense(
            6,
            weights=[
                np.zeros((64, 6), dtype="float32"),
                np.array([[1, 0, 0], [0, 1, 0]], dtype="float32").flatten(),
            ],
        )(locnet_y)

keras.layers.Dense layer no longer accepts a weights argument in its constructor in recent versions of Keras (TensorFlow 2.6 and above). Instead, weights should be set after the layer is created.

@faheem-khaskheli
Copy link

just comment the weights parameter

    locnet_y = keras.layers.Dense(
        6,
        # weights=[
        #     np.zeros((64, 6), dtype="float32"),
        #     np.array([[1, 0, 0], [0, 1, 0]], dtype="float32").flatten(),
        # ],
    )(locnet_y)

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

2 participants