c++ - 错误 : Invalid options syntax: -//tensorflow:libtensorflow_cc. 所以

标签 c++ windows powershell tensorflow bazel

我正在尝试按照 => this 上的说明第一次让 TensorFlow 在 C++ 中工作页面。

在 PowerShell 中我执行了

.\build.ps1 -//tensorflow:libtensorflow_cc.so -BuildCppAPI

但在执行过程中我得到以下信息:

ERROR: Invalid options syntax: -//tensorflow:libtensorflow_cc.so

我不知道这意味着什么 - 我什至不知道哪个系统正在打印出错误或什么操作失败了。下面是我在 PowerShell 窗口中看到的最后一部分。

You have bazel 0.20.0 installed.
Do you wish to build TensorFlow with XLA JIT support? [y/N]: n
No XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with ROCm support? [y/N]: n
No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: n
No CUDA support will be enabled for TensorFlow.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is /arch:AVX]:


Would you like to override eigen strong inline for some C++ compilation to reduce the compilation time? [Y/n]: n
Not overriding eigen strong inline, some compilations could take more than 20 mins.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
        --config=mkl            # Build with MKL support.
        --config=monolithic     # Config for mostly static monolithic build.
        --config=gdr            # Build with GDR support.
        --config=verbs          # Build with libverbs support.
        --config=ngraph         # Build with Intel nGraph support.
        --config=dynamic_kernels        # (Experimental) Build kernels into separate shared objects.
Preconfigured Bazel build configs to DISABLE default on features:
        --config=noaws          # Disable AWS S3 filesystem support.
        --config=nogcp          # Disable GCP support.
        --config=nohdfs         # Disable HDFS support.
        --config=noignite       # Disable Apacha Ignite support.
        --config=nokafka        # Disable Apache Kafka support.
        --config=nonccl         # Disable NVIDIA NCCL support.
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
c:\tf_windows_build\tensorflow-windows-build-script-master\source/.bazelrc
Starting local Bazel server and connecting to it...
ERROR: Invalid options syntax: -//tensorflow:libtensorflow_cc.so
INFO: Invocation ID: 8f02ecb6-9ff4-429a-841d-500d4246669f
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
c:\tf_windows_build\tensorflow-windows-build-script-master\source/.bazelrc
INFO: Invocation ID: 5fd16822-1851-41f6-ac48-fdda432096f5

最佳答案

ERROR: Invalid options syntax: -//tensorflow:libtensorflow_cc.so

I have no idea what this means

字面意思就是它所说的:您使用了无效的选项语法。

事实证明,您稍微误读了说明。命令格式为:

.\build.ps1 -BazelBuildParameters <parameter_string> [optional_parameters]

您删除了文本“BazelBuildParameters”,所以您改为这样做:

.\build.ps1 -<parameter_string> [optional_parameters]

而且计算机不知道如何处理它。


我想你想要这样的东西:

.\build.ps1 -BazelBuildParameters //tensorflow:libtensorflow_cc.so -BuildCppAPI

关于c++ - 错误 : Invalid options syntax: -//tensorflow:libtensorflow_cc. 所以,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57203607/

相关文章:

windows - 我应该在哪里存储配置文件?

powershell - 在Powershell中将哈希表的输出格式化为输出到一行

multithreading - 我如何才能创建在完成时产生结果的工作?

c# - 桌面应用程序中的数据可视化

android - 将wifi SSID与c++中的字符串进行比较

c++ - 为什么 operator!= 不能进行转换?

c++ - 在这种情况下我是否需要清空 map 的内容以避免内存泄漏

Windows 8 fat 二进制文件(x86 和 ARM 的 exe)

windows - 使用 Microsoft VC (cl.exe) 2010 (10.0) Express 和 ActivePerl 5.12.4/32 构建 Perl/C 模块

regex - Powershell RegEx - 字符串与模式匹配,但是字符串的一部分