diff options
Diffstat (limited to 'tests/test_target_cortex_a_operators.py')
-rw-r--r-- | tests/test_target_cortex_a_operators.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_target_cortex_a_operators.py b/tests/test_target_cortex_a_operators.py index 16cdca5..a4cfb2e 100644 --- a/tests/test_target_cortex_a_operators.py +++ b/tests/test_target_cortex_a_operators.py @@ -1,10 +1,10 @@ -# SPDX-FileCopyrightText: Copyright 2022-2023, Arm Limited and/or its affiliates. +# SPDX-FileCopyrightText: Copyright 2022-2024, Arm Limited and/or its affiliates. # SPDX-License-Identifier: Apache-2.0 """Tests for Cortex-A operator compatibility.""" from pathlib import Path import pytest -import tensorflow as tf +from keras.api._v2 import keras # Temporary workaround for now: MLIA-1107 from mlia.nn.tensorflow.tflite_convert import convert_to_tflite_bytes from mlia.target.cortex_a.config import CortexAConfiguration @@ -42,13 +42,13 @@ def test_get_cortex_a_compatibility_info_not_compatible( monkeypatch: pytest.MonkeyPatch, ) -> None: """Construct and test a NOT fully compatible TensorFlow Lite model.""" - keras_model = tf.keras.Sequential( + keras_model = keras.Sequential( [ - tf.keras.Input(shape=(28, 28, 1), batch_size=1, name="input"), - tf.keras.layers.Conv2D( + keras.Input(shape=(28, 28, 1), batch_size=1, name="input"), + keras.layers.Conv2D( filters=12, kernel_size=(3, 3), activation="softmax", name="conv1" ), - tf.keras.layers.LeakyReLU(), + keras.layers.LeakyReLU(), ] ) keras_model.compile(optimizer="sgd", loss="mean_squared_error") |