Python bazel build tensorflow/tools/graph_transforms:transform_graph错误

Python bazel build tensorflow/tools/graph_transforms:transform_graph错误,python,tensorflow,model,bazel,Python,Tensorflow,Model,Bazel,当我想用bazel转换模型时,我遇到了一些问题。 我试试这个: $ bazel build tensorflow/tools/graph_transforms:transform_graph 以下是错误: 错误:跳过“tensorflow/tools/graph\u transforms:transform\u graph”:没有此类包“tensorflow/tools/graph\u transforms”:在包路径上找不到生成文件 有人能告诉我怎么用吗? 非常感谢 然后我试试这个命令:

当我想用bazel转换模型时,我遇到了一些问题。
我试试这个:

$  bazel build tensorflow/tools/graph_transforms:transform_graph
以下是错误:

错误:跳过“tensorflow/tools/graph\u transforms:transform\u graph”:没有此类包“tensorflow/tools/graph\u transforms”:在包路径上找不到生成文件

有人能告诉我怎么用吗? 非常感谢

然后我试试这个命令:

$ bazel build tensorflow/tools/graph_transforms:vgg_16_10000.pb
我把图形转换放在工具目录中,把
vgg\u 16\u 10000.pb
放在
graph\u转换中。

我仍然遇到同样的问题。

为了运行第一个命令(
bazel build
),您必须在指定的目录下有一个构建文件,在本例中,该目录是tensorflow/tools/graph\u transforms。仅根据您提供的信息,您可能还没有克隆或下载Tensorflow存储库。如果只使用pipconda install安装了Tensorflow,则不能简单地运行该命令,因为这些不包括源代码


这些信息应该足够让您决定是否真正要构建源代码或使用python API,如图所示。

导航到tensorflow源代码目录的根目录运行
/configure

$ ./configure
$ bazel build tensorflow/tools/graph_transforms:summarize_graph