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

AttributeError: Exception encountered when calling MonoDense.call(). can't set attribute 'kernel' #13

Open
anthonybritto opened this issue Nov 15, 2024 · 0 comments

Comments

@anthonybritto
Copy link

Hi,

Thanks for your work on this package. I keep running into the error indicated in the title. To make sure it wasn't just my installation, I ran the collab on your homepage:

https://colab.research.google.com/github/airtai/monotonic-nn/blob/main/nbs/index.ipynb

and the error popped up there too (see below). Would be grateful for a quick fix / any ideas on how to proceed. Thanks!

Epoch 1/10
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-6-a9d306e6c0b4>](https://localhost:8080/#) in <cell line: 12>()
     10 model.compile(optimizer=optimizer, loss="mse")
     11 
---> 12 model.fit(
     13     x=x_train, y=y_train, batch_size=32, validation_data=(x_val, y_val), epochs=10
     14 )

3 frames
[/usr/local/lib/python3.10/dist-packages/airt/_components/mono_dense_layer.py](https://localhost:8080/#) in replace_kernel_using_monotonicity_indicator(layer, monotonicity_indicator)
    170     old_kernel = layer.kernel
    171 
--> 172     layer.kernel = apply_monotonicity_indicator_to_kernel(
    173         layer.kernel, monotonicity_indicator
    174     )

AttributeError: Exception encountered when calling MonoDense.call().

can't set attribute 'kernel'

Arguments received by MonoDense.call():
  • inputs=tf.Tensor(shape=(None, 3), dtype=float32)

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

1 participant