Is it possible to load a Google Automl model (TFlite, .js, or Saved Model) in Colab?
I tried with the Saved Model following this How to get google AutoML model coefficients but it did not work (file not found error...)
import tensorflow as tf
path_mdl = "/xxxxx/xxxxx/saved_model.pb" # folder to file with saved_model.pb
with tf.compat.v1.Session(graph=tf.Graph()) as sess:
tf.saved_model.load(path_mdl)
graph = tf.get_default_graph()
# print input and output operations
graph.get_operations()
# print infos about all nodes
weight_nodes = [n for n in graph_def.node if n.op == 'Const']
for n in weight_nodes:
print("Name of the node - %s" % n.name)
print("Value - " )
print(tensor_util.MakeNdarray(n.attr['value'].tensor))