首页 文章

Tensorflow无法构建image_retraining:label_image

提问于
浏览
0

我用AVX和SSE编译了TensorFlow(从git仓库克隆) . Hello TensorFlow脚本工作,并且不会打印CPU支持二进制文件未编译的指令的警告 .

后来我用图像创建了目录并运行了再培训器:

$ bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir ~/mydata

但是当我尝试构建label_image时,我收到此错误:

bazel build --config=opt tensorflow/examples/image_retraining:label_image
ERROR: Skipping 'tensorflow/examples/image_retraining:label_image': no such target '//tensorflow/examples/image_retraining:label_image': target 'label_image' not declared in package 'tensorflow/examples/image_retraining' defined by /home/user/myretraining/tensorflow/tensorflow/examples/image_retraining/BUILD
WARNING: Target pattern parsing failed.
ERROR: no such target '//tensorflow/examples/image_retraining:label_image': target 'label_image' not declared in package 'tensorflow/examples/image_retraining' defined by /home/user/myretraining/tensorflow/tensorflow/examples/image_retraining/BUILD
INFO: Elapsed time: 0.118s
FAILED: Build did NOT complete successfully (0 packages loaded)

(/home/user/myretraining is the source dir root)

我究竟做错了什么?我怎样才能编译label_image?

1 回答

  • 2

    你的 label_image.py 不在这个目录中的tensorflow / examples / image_retraining,在我的例子中,它位于tensorflow / examples / label_image这个文件夹中 . 所以试试吧

    bazel build tensorflow/examples/label_image:label_image
    

    希望能帮助到你 .

相关问题