Skip to content

Commit 2c867f8

Browse files
committed
Update TestCheckLastLayerActivation tests
1 parent 1fbd931 commit 2c867f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

keras/engine/training_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5013,7 +5013,7 @@ def test_sequential_model_output(self):
50135013
ValueError,
50145014
"has a single unit output, but the activation is softmax.*",
50155015
):
5016-
model.compile()
5016+
model.compile(loss="mse", optimizer="sgd")
50175017
del model
50185018

50195019
def test_functional_model_output(self):
@@ -5025,7 +5025,7 @@ def test_functional_model_output(self):
50255025
ValueError,
50265026
"has a single unit output, but the activation is softmax.*",
50275027
):
5028-
model.compile()
5028+
model.compile(loss="mse", optimizer="sgd")
50295029
del model
50305030

50315031
def test_multi_output_model(self):
@@ -5038,7 +5038,7 @@ def test_multi_output_model(self):
50385038
ValueError,
50395039
"has a single unit output, but the activation is softmax.*",
50405040
):
5041-
model.compile()
5041+
model.compile(loss="mse", optimizer="sgd")
50425042
del model
50435043

50445044
def test_multi_input_output_model(self):
@@ -5054,7 +5054,7 @@ def test_multi_input_output_model(self):
50545054
ValueError,
50555055
"has a single unit output, but the activation is softmax.*",
50565056
):
5057-
model.compile()
5057+
model.compile(loss="mse", optimizer="sgd")
50585058
del model
50595059

50605060

0 commit comments

Comments
 (0)