android - 如何在android studio中读取输出张量(tflite)
问题描述
我可以在 python 中获取形状并读取张量本身,但只能在 android tflite 中使用 tflite.getOutputTensor(0).shape() 和 tflite.getInputTensors(0).shape() 获取张量的形状。我在 python 中使用 .get_tensor(nodevalue) 读取张量,但我应该如何在 android 中执行此操作
解决方案
您必须在调用之前将输出缓冲区分配给解释器。有关示例代码,请参见以下链接。
或者对于多个输出,
推荐阅读
- codenameone - 代号一倒扫二维码
- java - Java Swing:获取对 GUI 组件的引用
- java - 用 Java 计算产品,术语与“for”循环,不同的结果
- mysql - 最佳实践:截断并重新创建关联表条目或每天更新它们?
- sql - 如何在 SQL 中使用小于或等于运算符的 case 表达式?
- php - Wordpress 给出“未指定输入文件”错误,但仅在主域上
- javascript - 一次选择和取消选择所有复选框
- python - 处理来自 Google Speech 的响应
- python-3.x - 如何像其他公共 python 库一样从我的 python 代码生成 .exe?
- javascript - 从复杂的 JSON 迭代到表中