diff --git a/examples/TensorFlow/Keras/IRIS/keras_to_MDF.py b/examples/TensorFlow/Keras/IRIS/keras_to_MDF.py index 1ee90ed2..0ff50638 100644 --- a/examples/TensorFlow/Keras/IRIS/keras_to_MDF.py +++ b/examples/TensorFlow/Keras/IRIS/keras_to_MDF.py @@ -11,6 +11,10 @@ from modelspec.utils import _val_info from modeci_mdf.execution_engine import EvaluableGraph +# Import keras_model to ensure it runs and generates the model +sys.path.append(".") +import keras_model # noqa: F401 + # load the keras model model = tf.keras.models.load_model("keras_model_on_iris.keras") diff --git a/examples/TensorFlow/Keras/MNIST/keras_to_MDF.py b/examples/TensorFlow/Keras/MNIST/keras_to_MDF.py index fe9c30b6..abf2e4c5 100644 --- a/examples/TensorFlow/Keras/MNIST/keras_to_MDF.py +++ b/examples/TensorFlow/Keras/MNIST/keras_to_MDF.py @@ -1,3 +1,5 @@ +import sys + import numpy as np import tensorflow as tf @@ -5,6 +7,10 @@ from modelspec.utils import _val_info from modeci_mdf.execution_engine import EvaluableGraph +# Import keras_model to ensure it runs and generates the model +sys.path.append(".") +import keras_model # noqa: F401 + # load the keras model model = tf.keras.models.load_model("kr_N_model.keras") diff --git a/tests/test_examples.py b/tests/test_examples.py index 7718e0f9..1e30aa43 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -28,6 +28,7 @@ ".reconstructed.py", "generate_json_and_scripts.py", "pytorch_ddm.py", + "keras_model.py", ] # Filter any excluded example scripts