-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Custom Model Data Cardinality Check Ambiguous #47116
Comments
I have replicated the issue on tf 2.4 and nightly, please find the gist here. |
Sorry about that @Saduf2019. I've edited the post for the shape error. I've attached output for 2.3.2 below and here is a gist |
@whitead
|
Hi @Saduf2019 that was the message from 2.3.2. I will repost the error message for 2.4.1 below. My issue is that the code works in 2.3.2 but not in 2.4.1 and I do not know how to fix. |
Issue still exists in TF 2.5. Please find the gist here.Thanks! |
System information
Describe the current behavior
Training Keras custom model when inputs are lists fail data cardinality check if leading axis is not batch. The code below works in 2.3.2 but not 2.4.1. An example of why you would not want a leading axis as batch is a per-batch weight or dynamic parameter (see example code).
Describe the expected behavior
This worked in 2.3.2 but was changed. I read the release notes and cannot seem to understand why this behavior changed. I am unsure how to fix. Either a flag to remove this check, a way to change the input spec of model call, or clarification on how to allow inputs that do not have a leading batch axis would help me fix this problem.
Standalone code to reproduce the issue
** Error Message**
The text was updated successfully, but these errors were encountered: