Node 'Pad_17': Unknown input node 'Relu_18' when call import_graph_def for pb file
nilaytufek opened this issue · comments
When I want to convert pb file to tflite OR when I just want to load pb file, I get this error for both cases.
PS: pb file generated from pth (onnx) file.
`import tensorflow as tf
converter = tf.lite.TFLiteConverter.from_frozen_graph('saved_model.pb',
input_arrays=['Pad'], # input arrays
output_arrays=['RELU'] # output arrays as told in upper in my model case it si add_10
)
`
or
`import sys
from tensorflow.python.platform import gfile
from tensorflow.core.protobuf import saved_model_pb2
from tensorflow.python.util import compat
import tensorflow as tf
from tensorflow.python.platform import gfile
with tf.Session() as sess:
model_filename ='saved_model.pb'
with gfile.FastGFile(model_filename, 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
#print(graph_def)
g_in = tf.train.import_meta_graph(graph_def)`
Hi @nilaytufek,
I am facing the exact same error, when i load the my .pb file generated from pth (onnx) file.
Did you find any solution for this?