Skip to content

Commit

Permalink
fix engine training tests ValueError message on empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrtk committed Apr 27, 2023
1 parent 0a66368 commit 8c0bd19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keras/engine/training_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_fit_on_empty(self):
model = sequential.Sequential([layers_module.Dense(1)])
model.compile("sgd", "mse", run_eagerly=test_utils.should_run_eagerly())
with self.assertRaisesRegex(
ValueError, "Unexpected result of `train_function`.*"
ValueError, "Expected input data to be non-empty."
):
model.fit(x=np.array([]), y=np.array([]))

Expand Down Expand Up @@ -2448,7 +2448,7 @@ def test_predict_error_with_empty_x(self):
model.compile(loss="mse")

with self.assertRaisesRegex(
ValueError, "Unexpected result of `predict_function`.*"
ValueError, "Expected input data to be non-empty."
):
model.predict(np.array([]))

Expand Down

0 comments on commit 8c0bd19

Please sign in to comment.