macos - 为 macOS 构建 TensorFlow Lite C++ API 的正确命令是什么?
问题描述
我成功地使用了基于 macOS 的 TensorFlow Lite C++ API for Android。
现在我想在 macOS 上试用它,因为 TensorFlow Lite 支持 Metal 委托(对于 iOS?)。要知道,TensorFlow 本身在几年前就已经停止在 macOS 上支持 GPU。
为 macOS 构建 TensorFlow Lite C++ API 的正确命令是什么?
对于安卓,
bazel build -c opt --config=android_arm64 //tensorflow/lite:libtensorflowlite.so
我不知道 macOS 的配置。但我认为它应该存在,因为 tflite_runtime 包存在于 macOS 上。
谢谢你。
解决方案
你可以试试下面的吗?
bazel build -c opt --cpu=darwin //tensorflow/lite:libtensorflowlite.so
这将为 x86_64 macos 构建.so
文件。话虽如此,Metal 委托可能不包含在最终的二进制文件中,因为 Metal 委托专门针对 iOS。
推荐阅读
- python - 使用 json 文件添加调平系统时,discord.py 命令不起作用
- vbscript - VBScript:从网页下载 JSON 文件并将内容读取到变量
- ios - 如何从 AVAudioBuffer 音频样本中确定音量
- next.js - NextJs - Apollo - 第一次渲染不是 SSR
- sql - 没有 CREATE TABLE 的连接列上的 SQL JOIN
- sqlite - 当从文字中的相同总数中减去总和时,SQLite 会显示浮点数
- python - 在熊猫数据框中组合多行
- reactjs - 收到警告:列表中的每个孩子都应该有一个唯一的“关键”道具。在传播 props 和组合多个 Mui 组件时
- spring-integration - WARN JdbcChannelMessageStore 带有 id 的消息没有被删除
- python - cv2.imshow([winname], [mat]) 后的分段错误