Discretization using one_hot as output_model doesn't work as expected #20672
Unanswered
kianyangchn
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Environment: Py310, TF2.16.1, keras 3.7
Hi I'm trying to add a simple discretization layer(with pre-defined bin_boundries and one_hot output_mode) in a toy model.
The expected output shape of this layer in the model is (None, 1) instead of (None, len(bin_boundries)+1).
The actual output shape is correct, just the model expects the output to be (None, 1), which leading to the error
expected axis -1 of input shape to have value 1, but received input with shape (None, 6)
Seems a bug in compute_output_shape
Beta Was this translation helpful? Give feedback.
All reactions