0

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))
  • You should be able to, have you tried this: https://stackoverflow.com/questions/58461211/saved-model-from-automl-vision-edge-not-loading-properly/58757328#58757328 – shortcipher3 Mar 11 '21 at 20:56
  • You want the directory of the `saved_model.pb`, like this: `path_mdl = "/xxxxx/xxxxx/"` – shortcipher3 Mar 11 '21 at 20:57

0 Answers0