From d2e6927583e34b8516c56a92c5cf67998f22166a Mon Sep 17 00:00:00 2001 From: ramnarak <88007420+ramnarak@users.noreply.github.com> Date: Fri, 6 Sep 2024 12:18:13 -0400 Subject: [PATCH] Complete move of the TF conversion script --- interop/save_model_tf.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 interop/save_model_tf.py diff --git a/interop/save_model_tf.py b/interop/save_model_tf.py new file mode 100644 index 0000000..ae55f46 --- /dev/null +++ b/interop/save_model_tf.py @@ -0,0 +1,8 @@ +#The following snippet is executed in Python 3.9 with TensorFlow 2.10. Currently, the import functionality in MATLAB support upto TF 2.10. +#The command to install TensorFlow 2.10 is: +#pip install tensorflow==2.10 + +import tensorflow as tf +model = tf.keras.models.load_model('2019_09_11_23_32_unet_single_1024_mean_absolute_error_Ai93-0450.h5') +model.save('TF_2019_09_11_23_32_unet_single_1024_mean_absolute_error_Ai93-0450', save_format='tf') +