在Visual Studio上使用Tensorflow-Lite时出错

问题描述

我是C ++的新手,我试图在Windows上使用tflite模型进行项目,但似乎无法在Visual Studio 2019上构建它。

我在this link之后并以bazel 2.0.0和以下命令构建了tflite 2.2.0:

bazel build -c opt //tensorflow:libtensorflow.so //tensorflow:libtensorflow_cc.so //tensorflow:install_headers //tensorflow/tools/pip_package:build_pip_package
bazel build -c opt //tensorflow/lite:tensorflowlite
bazel build -c opt //tensorflow/lite:libtensorflowlite.so

然后,我在项目的属性中添加了包含和库,我的输入如下所示:

libtensorflow_cc.so
libtensorflow.so
libtensorflowlite.so

但是当我运行项目时,我得到以下信息:

Erreur  LNK1107 fichier non valide ou endommagé : impossible de lire à 0x2F8    personmask  B:\tensorflow\tensorflow-2.2.0\bazel-bin\tensorflow\lite\libtensorflowlite.so   1

PS:我还尝试使用VS2017与构建tensorflow

bazel build -c opt --config=v2 //tensorflow:libtensorflow.so //tensorflow:libtensorflow_cc.so //tensorflow/tools/pip_package:build_pip_package //tensorflow/lite:tensorflowlite //tensorflow/lite:libtensorflowlite.so

但是只有FAILED: Build did NOT complete successfully带有两个另外的显式错误之一,在失败前几百行,具体取决于我是否在构建命令上使用--config=v2 >

ERROR: B:/tensorflow/tensorflow-2.2.0/tensorflow/core/kernels/BUILD:799:1: C++ compilation of rule '//tensorflow/core/kernels:eigen_contraction_kernel_with_mkl' failed (Exit 2)
ERROR: B:/tensorflow/tensorflow-2.2.0/tensorflow/compiler/xla/service/cpu/BUILD:688:1: C++ compilation of rule '//tensorflow/compiler/xla/service/cpu:runtime_single_threaded_matmul' failed (Exit 2)

您对出什么问题有想法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...