当我按照此说明操作时: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$
答案 0 :(得分:2)
从{
}更改this line
package(default_visibility = [":public"])
为:
package(default_visibility = ["//visibility:public"])