node.js - 在 Node.js 中加载 TensorFlow 卡住图 (.pb)

标签 node.js tensorflow tensorflow-lite

我将 tensorflow 模型保存在适合 TensorFlow Lite 使用的卡住 PB 文件中。 该文件可以在 Android 中加载,并且可以通过以下代码正常运行:

导入 org.tensorflow.contrib.android.TensorFlowInferenceInterface; …… TensorFlowInferenceInterface 推理接口(interface); inferenceInterface = new TensorFlowInferenceInterface(context.getAssets(), "MODEL_FILE.pb");

有没有办法在 Node.js 中加载卡住图?

最佳答案

我找到了解决方案here : 1. 模型必须转换为 Web 友好格式,即 JSON 文件。 2.然后可以在Nodejs中使用'@tensorflow/tfjs'加载。

关于node.js - 在 Node.js 中加载 TensorFlow 卡住图 (.pb),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54026922/

相关文章:

java - 如何在 Firebase 图像标签中使用输入和输出数据类型为 uint8 的 TFLite 模型

python - 属性错误: module 'tensorflow' has no attribute 'lite' in Keras model to Tensorflow Lite convertion - Python

javascript - 为 Express 和 Nginx 配置 HTTPS

node.js - Azure 应用服务无法运行部署命令

tensorflow - 无法使用tensorflow 2.0.0 beta1保存模型

python - 调用 sess.run() 时 Tensorflow 挂起

android - Tensorflow Lite : No module named tf. contrib.lite

node.js - 使用 Passport-facebook-token 在 Nodejs 中处理身份验证,来自前端 Facebook SDK 的请求

node.js - 如何将 Nest.js 微服务拆分为单独的项目?

python - 使用特征张量复制 TensorFlows Conv2D 操作