ios - MLMultiArray 使用未声明的类型错误

标签 ios swift coreml undeclared-identifier coremltools

我正在尝试为 coreML 模型设置输入,该模型将 MLMultiArray 作为输入。我在此站点上引用了有关如何将 Double 数组转换为 MLMultiArray 的解决方案。但是,我收到 MLMultiArray 的“使用未声明的类型”错误。

screenshot of the error and "my" code

或者,对于如何设置一个模型来代替一维 double 组,您有什么建议吗?我的模型是从 sklearn 转换而来的 SVR。

我正在使用 Xcode 9.2,但是一旦我发布这个,我将更新到 9.3 看看是否有帮助。

非常感谢。

(另外,别担心——我在标题中引用了相关的堆栈溢出来源!)

最佳答案

@import CoreML

您需要在您的类中导入框架。

关于ios - MLMultiArray 使用未声明的类型错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50045630/

相关文章:

ios - 我应该使用哪个 ab 测试应用程序来测量将在 Apple App Store 中发布的使用 HTML 和 kendoui 创建的移动应用程序?

ios - 问题连接到 iTunes 连接

arrays - 将多个数组组合/合并为一个

ios - 如何展开和折叠 UILabel?

ios - 有什么有效的方法可以自动从rest API获取更新而无需推送通知?

ios - PNG 图像从未解除分配

swift - 在 SpriteKit SWIFT 中获取 SKReferenceNode 的子节点

ios - 如何使用不接受实时输入的 CoreML 在 Swift 中创建一个简单的相机应用程序?

coreml - CreateML 推荐器训练错误 : Item IDs in the recommender model must be numbered 0, 1, ..., num_items - 1

ios - 导入 mymodel.mlmodel 时出现 CoreML : source file is not valid , 错误