我正在测试命令以检查自定义构建的张量流图。
我使用的命令是Here
中的命令bazel build tensorflow/tools/graph_transforms:summarize_graph bazel-bin/tensorflow/tools/graph_transforms/summarize_graph --in_graph=/home/WarMachineRox/test_frozen_graph.pb
但它返回错误说:
ERROR: Unrecognized option: --in_graph=/home/WarMachineRox/test_frozen_graph.pb
如果我使用没有' - '的in_graph选项,则返回:
ERROR: no such package 'tensorflow/tools/graph_transforms/tensorflow/tools/graph_transforms': BUILD file not found on package path
有没有使用它来检查tensorflow图输入节点?
谢谢,
答案 0 :(得分:2)
bazel build tensorflow/tools/graph_transforms:summarize_graph bazel-bin/tensorflow/tools/graph_transforms/summarize_graph --in_graph=/home/WarMachineRox/test_frozen_graph.pb
应该是两个单独的命令:
$ bazel build tensorflow/tools/graph_transforms:summarize_graph
INFO: Analysed target //tensorflow/tools/graph_transforms:summarize_graph (0 packages loaded).
INFO: Found 1 target...
Target //tensorflow/tools/graph_transforms:summarize_graph up-to-date:
bazel-bin/tensorflow/tools/graph_transforms/summarize_graph
INFO: Elapsed time: 0.372s, Critical Path: 0.00s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
$ bazel-bin/tensorflow/tools/graph_transforms/summarize_graph
2018-05-29 12:37:51.343760: E tensorflow/tools/graph_transforms/summarize_graph_main.cc:313] in_graph graph can't be empty.
usage: bazel-bin/tensorflow/tools/graph_transforms/summarize_graph
Flags:
--in_graph="" string input graph file name
--print_structure=false bool whether to print the network connections of the graph