keras
keras copied to clipboard
Check for empty input array
Added assertion for checking empty input array in Model.fit function. Closes: #16202
Thanks for the PR.
First of all we should fix the current error message:
ValueError: Unexpected result of
train_function
(Empty logs). Please useModel.compile(..., run_eagerly=True)
, ortf.config.run_functions_eagerly(True)
for more information of where went wrong, or file a issue/bug totf.keras
.
Update to:
ValueError: Unexpected result of
train_function
(Empty logs). Try usingModel.compile(..., run_eagerly=True)
for easier debugging of what went wrong.
Second, to display a more specific error message we should add the error code in data_adapter.py so that it gets raised here: data_handler = data_adapter.get_data_handler(...)
Third, in order to raise an error message we should use ValueError
, not assert
.
@fchollet Thank you for reviewing. I have updated the error message both in the train_function
and predict_function
in this PR. Plus added the specific error message in data_adapter.get_data_handler(...)
.
@Vishu26 Can you please check @qlzh727's comments and keep us posted ? Thank you!
Hi @gbaned ! Is it enough to use if else checks for iterator and dataset?
@qlzh727 Can you please assist on above comments from @Vishu26. Thank you!
Hi @qlzh727 Any update on this PR? Please. Thank you!
Hi all,
Is there a solution which can resolve this issue?
Hi @Vishu26 Can you please resolve conflicts? Thank you!
This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.
This PR was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.