Skip to content

Node 'Pad_17': Unknown input node 'Relu_18' when call import_graph_def for pb file #45

Description

@nilaytufek

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)`

Untitled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions