Closed linux-devil closed 6 years ago
I am trying to generate and free the graph for same operations I need input node and output node. Based on graph visualization on tensorboard seems like input node is Placeholder and output node is concat_1
In commit dd09029823f5389282dd575b78d00da5b2fcfae8 I named detections node, so now output node is 'detections'. The input node is the placeholder defined in demo.py
I am using latest commit, I made changes to save session using saver.save(sess,export_dir)
Further I use save_freeze.py to freeze graph which takes output node as parameter and it fails while running it using "detections"
you can find save_freeze.py here :
https://github.com/linux-devil/lstm_practice/blob/master/save_freeze.py
command :
python save_freeze.py --model_dir "/xxxx/yolov3_checkpoint" --output_node_names "detections"
Following is the graph as visualized on tensorboard: There is no node named "detections"
Any thoughts?
@linux-devil, there should be node named '\<scope>/yolo-v3/detections'. Check this code:
import tensorflow as tf
import numpy as np
from yolo_v3 import yolo_v3, load_weights, detections_boxes
inputs = tf.placeholder(tf.float32, [1, 416, 416, 3])
with tf.variable_scope('detector'):
detections = yolo_v3(inputs, 80)
t = tf.get_default_graph().get_tensor_by_name('detector/yolo-v3/detections:0')
print(t)
while running in android using .pb file, I am getting no node "detections" : - java.lang.RuntimeException: Node 'detections' does not exist in model 'file:///android_asset/tiny_graph.pb'
So indeed there is no node detections. What to do?
I want to know output node