From 38c41edb89a2f70d0d057984a1834d0918052d56 Mon Sep 17 00:00:00 2001 From: Howard Chiam Date: Mon, 29 Jan 2024 20:49:46 -0700 Subject: [PATCH] tf_keras doesn't run in colab, revert back to tf.keras for working demo --- documentation/tf_df_in_tf_js.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/documentation/tf_df_in_tf_js.md b/documentation/tf_df_in_tf_js.md index 98d4648..0ef6788 100644 --- a/documentation/tf_df_in_tf_js.md +++ b/documentation/tf_df_in_tf_js.md @@ -45,10 +45,9 @@ import tensorflow as tf import tensorflow_decision_forests as tfdf import tensorflowjs as tfjs from google.colab import files -import tf_keras # Load the model with Keras -model = tf_keras.models.load_model("/tmp/my_saved_model/") +model = tf.keras.models.load_model("/tmp/my_saved_model/") # Convert the keras model to TensorFlow.js tfjs.converters.tf_saved_model_conversion_v2.convert_keras_model_to_graph_model(model, "./tfjs_model")