aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Ge <jerry.ge@arm.com>2024-03-21 17:33:55 +0000
committerEric Kunze <eric.kunze@arm.com>2024-03-25 15:49:53 +0000
commitc44483694a6b3476d89968f6ee9463886d433211 (patch)
treee834a181e8827be4e6b4ad0e9abc9e990c1c3d37
parent32bf90181b8d4c5ba19416b9426f32ce2bdd9878 (diff)
downloadreference_model-c44483694a6b3476d89968f6ee9463886d433211.tar.gz
Fix framework test generation
- The framework test generation script is broken for some tests because TF2.16 has an issue with Keras 3.0 - Enforce the script to use Keras 2.0 and we also need to run pip install -U tf_keras together with this change Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I519aa89c5d5bacf659a809d9eda456bd83b33527
-rw-r--r--verif/frameworks/test_builder.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/verif/frameworks/test_builder.py b/verif/frameworks/test_builder.py
index 4bf8070..900f5fa 100644
--- a/verif/frameworks/test_builder.py
+++ b/verif/frameworks/test_builder.py
@@ -1,9 +1,13 @@
# Copyright (c) 2020-2024, ARM Limited.
# SPDX-License-Identifier: Apache-2.0
+import os
+
import numpy as np
import tensorflow as tf
from frameworks.tensor_gen import TGen
+os.environ["TF_USE_LEGACY_KERAS"] = "1"
+
class TBuilder:
"""The member functions build the tensorflow operators into small networks