Skip to content Skip to sidebar Skip to footer

Is There Some Way Of Load A .pb File Created In Tf V1 On Tensorflow V2?

I'm trying to load a .pb file that was created in tf v1 on a tfv2 dist, my question is, the version 2 does have compatibility with older pb? I already tried a few things, but none

Solution 1:

Convert it to a tf.saved_model with the code from here Convert a graph proto (pb/pbtxt) to a SavedModel for use in TensorFlow Serving or Cloud ML Engine

I just noticed that your .pb name is saved_model.pb so perhaps it is already a tf.saved_model. If that's the case you can load it as

func = tf.saved_model.load('.').signatures["serving_default"] 
out = func( tf.constant(10,tf.float32) )

Post a Comment for "Is There Some Way Of Load A .pb File Created In Tf V1 On Tensorflow V2?"