如何使用Coreml模型输出MLMultiarRay
我需要解析 CoreML 模型的预测输出结果。
我可以看到输出的类型是 MLMultiArray,但是当我在代码中使用该类型时,如下所示:
let a = MultiArray
它总是抛出错误:
在范围内找不到“MultiArray”
有人知道吗?
I need to parse the results in the output of prediction from a CoreML model.
I can see that the type of output is MLMultiArray, but when I use the type within my code like this:
let a = MultiArray<Float>(result.transpose_1_tmp_0)
It always throws an error:
Cannot find 'MultiArray' in scope
Anyone has any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Multiarray不是内置数据类型。使用变量名:
您也可能需要查看 a>。请按照 coremlhelpers 安装指令。
编辑:
mlmultiarray
是coreml
框架的一部分。要使用它,您必须导入这样的框架:MultiArray is not a built-in datatype. Use the variable name:
Also you might want to check out Swiftier MultiArray. Follow the CoreMLHelpers install instructions.
EDIT:
MLMultiArray
is part of theCoreML
framework. To use it, you must import the framework like this: