-
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
model.fit() should tell you if batch is not big enough to train with #48708
Comments
In order to expedite the trouble-shooting process, could you please provide the Tensorflow version,complete code and dataset to reproduce the issue reported here. Thanks! |
Tensorflow 2.4.1 |
Could you please provide the complete code and dataset or colab link to reproduce the issue reported here. |
@tilakrayal See the stack overflow link in the original post. |
@isaacgerg |
@Saduf2019 Please read the original issue carefully and note my proposal. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you. |
Suppose you train a model using model.fit() and your batch size is set to N. If the input from a generator is < N, tf keras gives the following error which is difficult to interpret: ValueError: Expect x to be a non-empty array or dataset.
Reference second answer in : https://stackoverflow.com/questions/63231811/valueerror-expect-x-to-be-a-non-empty-array-or-dataset-tensor-flow-lite-model
Propose to have tf keras tell user that batch size is larger than data size in place of current error. The current error implies that the x is empty which isnt this case for all x with size less than N.
The text was updated successfully, but these errors were encountered: