Does transform graph does support multiple outputs?

341 views
Skip to first unread message

Alex Biddulph

unread,
Feb 7, 2018, 10:44:16 PM2/7/18
to Discuss
I have a network that has a single input and multiple outputs that I would like to quantize using the transform_graph tool.

I am running the following command
bazel-bin/tensorflow/tools/graph_transforms/transform_graph --in_graph="frozen_inference_graph.pb" --out_graph="./quantized_graph.pb" --inputs="image_tensor:0" --outputs="detection_boxes:0 detection_scores:0 detection_classes:0 num_detections:0" --transforms="add_default_attributes strip_unused_nodes(type=float, shape=\"1,800,600,3\") remove_nodes(op=Identity, op=CheckNumerics) fold_constants(ignore_errors=true) fold_batch_norms fold_old_batch_norms quantize_weights quantize_nodes strip_unused_nodes sort_by_execution_order"

However, when I inspect the output graph using tensorboard detection_scores:0, detection_classes:0, and num_detections:0 are all missing from the graph.

Is this the intended behaviour of transform_graph? Does it not actually support multiple inputs and outputs (like the pluralisation of the command line arguments would suggest)?

Pete Warden

unread,
Feb 8, 2018, 5:06:55 PM2/8/18
to Alex Biddulph, Discuss
This is probably better answered on Stack Overflow, but from a quick inspection I would try adding commas rather than spaces between your output names (and if that's the problem, it's probably a bug that the tool doesn't warn about that).

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/6feae18c-f5b8-4f85-b1f7-f3eb421d05e1%40tensorflow.org.

Chaine San Buenaventura

unread,
Sep 19, 2018, 5:21:59 AM9/19/18
to Discuss
Were you able to solve this problem? 

Alex Biddulph

unread,
Sep 19, 2018, 7:32:10 PM9/19/18
to Discuss
Yes, using commas fixed the issue.

Chaine San Buenaventura

unread,
Sep 20, 2018, 5:26:06 PM9/20/18
to Discuss
Can you post the exact code that work? I'm getting errors. How did you know that the shape is \"1,800,600,3\"?  And why this format? When I use summarize_graph, I get "?,?,?,3" for the input node shape.


On Thursday, February 8, 2018 at 11:44:16 AM UTC+8, Alex Biddulph wrote:

Chaine San Buenaventura

unread,
Sep 20, 2018, 5:27:19 PM9/20/18
to Discuss
Also, last time I used `remove_nodes(op=Identity, op=CheckNumerics)`, it removed all the output nodes. Did you include this transform?


On Thursday, February 8, 2018 at 11:44:16 AM UTC+8, Alex Biddulph wrote:

Alex Biddulph

unread,
Sep 23, 2018, 7:55:01 PM9/23/18
to Discuss
The exact code I used is in my original message. All arguments I used I got from this readme
Reply all
Reply to author
Forward
0 new messages