bazel run error:没有这样的目标' // slim:public'

时间:2017-10-08 08:55:45

标签: tensorflow bazel

当我按照此说明操作时:https://github.com/tensorflow/models/tree/master/research/domain_adaptation
并运行:

> $ bazel run slim:download_and_convert_data -- --dataset_dir $DSN_DATA_DIR --dataset_name=mnist

我收到了这个错误:

chenshuo@ubuntu:~/research$ bazel run slim:download_and_convert_data -- --dataset_dir ./data --dataset_name=mnist
ERROR: /home/chenshuo/research/slim/BUILD:71:12: no such target '//slim:public': target 'public' not declared in package 'slim' defined by /home/chenshuo/research/slim/BUILD (this is usually caused by a missing package group in the package-level visibility declaration).
ERROR: /home/chenshuo/research/slim/BUILD:69:1: no such target '//slim:public': target 'public' not declared in package 'slim' defined by /home/chenshuo/research/slim/BUILD and referenced by '//slim:download_and_convert_data'.
ERROR: /home/chenshuo/research/slim/BUILD:69:1: no such target '//slim:public': target 'public' not declared in package 'slim' defined by /home/chenshuo/research/slim/BUILD and referenced by '//slim:download_and_convert_data'.
ERROR: Analysis of target '//slim:download_and_convert_data' failed; build aborted.
INFO: Elapsed time: 0.286s
ERROR: Build failed. Not running target.

如何修复此错误?感谢。

系统信息

  • 您正在使用的模型的顶级目录是什么~/research$
  • 我是否编写过自定义代码(与使用TensorFlow中提供的库存示例脚本相反):否
  • OS平台和发行版(例如,Linux Ubuntu 16.04):Linux Ubuntu 14.04
  • 从(来源或二进制)安装的TensorFlow :来源
  • TensorFlow版本(使用下面的命令):1.3.0
  • Bazel版本(如果从源代码编译):0.5.2
  • CUDA / cuDNN版本:cuda-7.5
  • GPU型号和内存:GeForce GTX TITAN X
  • 重现的确切命令

1 个答案:

答案 0 :(得分:2)

从{

}更改this line

package(default_visibility = [":public"])

为:

package(default_visibility = ["//visibility:public"])