|
17 | 17 | from keras.src.models import Functional
|
18 | 18 | from keras.src.models import Model
|
19 | 19 | from keras.src.models import Sequential
|
20 |
| -from keras.src.models.model import model_from_json |
21 | 20 |
|
22 | 21 |
|
23 | 22 | class FunctionalTest(testing.TestCase):
|
@@ -274,19 +273,6 @@ def test_restored_multi_output_type(self, out_type):
|
274 | 273 | out_val = model_restored(Input(shape=(3,), batch_size=2))
|
275 | 274 | self.assertIsInstance(out_val, out_type)
|
276 | 275 |
|
277 |
| - def test_restored_nested_input(self): |
278 |
| - input_a = Input(shape=(3,), batch_size=2, name="input_a") |
279 |
| - x = layers.Dense(5)(input_a) |
280 |
| - outputs = layers.Dense(4)(x) |
281 |
| - model = Functional([[input_a]], outputs) |
282 |
| - |
283 |
| - # Serialize and deserialize the model |
284 |
| - json_config = model.to_json() |
285 |
| - restored_json_config = model_from_json(json_config).to_json() |
286 |
| - |
287 |
| - # Check that the serialized model is the same as the original |
288 |
| - self.assertEqual(json_config, restored_json_config) |
289 |
| - |
290 | 276 | @pytest.mark.requires_trainable_backend
|
291 | 277 | def test_layer_getters(self):
|
292 | 278 | # Test mixing ops and layers
|
|
0 commit comments