-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to ios application #2
Comments
Update: i've find out that the output node name are "InceptionV4/y:0" Then i got new error TypeError: Cannot interpret feed_dict key as Tensor: The name 'flag_placeholder:0' refers to a Tensor which does not exist. The operation, 'flag_placeholder', does not exist in the graph. When trying to invoke run with params generator from your inferno.py |
Update: i'm successfull to convert to pb model type, also success make prediction, and it work like a charm :D. so i'm sharing the guide to anyone who interested like me:
|
@fanlovejx , I'm happy that you could solve your problem and my repo is useful for you. I'm excited to see your results. if possible record a demo and publish to youtube or somewhere else. |
Hi Alireza Keshavarzi, last week i found your amazing work, and it work like a charm, i'm trying to porting it to ios application but so far i'm stucked, can you guide me some tip,
i'm trying to convert model to PB format then to tflite, i'm stuck at define output_node_name for conver to pb step (['InceptionV4/Logits/Predictions']), then i'm using all possible node name
min_graph = tf.compat.v1.graph_util.convert_variables_to_constants(session, session.graph_def, [node.name for node in graph.as_graph_def().node])
tf.train.write_graph(min_graph, "logdir/", "file.pb", as_text=False)
with open('output_graph.pb', 'wb') as f:
f.write(min_graph.SerializeToString())
i got success output pb file, but when load it i got these error
GRAPH_PB_PATH = 'logdir/file.pb'
with tf.Session() as sess:
print("load graph")
with gfile.FastGFile(GRAPH_PB_PATH,'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
sess.graph.as_default()
tf.import_graph_def(graph_def, name='3A4Bh-Ref25')
=> ERROR: ValueError:ValueError: Input 0 of node 3A4Bh-Ref25/global_step/Assign was passed int32 from 3A4Bh-Ref25/global_step:0 incompatible with expected int32_ref.
so i'm stucked here
Please help me,
Thanks and Besst Regard
The text was updated successfully, but these errors were encountered: