Ste*_*ani 5 ios swift pytorch coreml onnx
我有两个 CoreML 模型。一个工作正常,另一个生成此错误消息:
[espresso] [Espresso::ANERuntimeEngine::__forward_segment 0] evaluate[RealTime]WithModel returned 0; code=5 err=Error Domain=com.apple.appleneuralengine Code=5 "processRequest:qos:qIndex:error:: 0x3: Program Inference overflow" UserInfo={NSLocalizedDescription=processRequest:qos:qIndex:error:: 0x3: Program Inference overflow}
[espresso] [Espresso::overflow_error] /var/containers/Bundle/Application/E0DE5E08-D2C6-48AF-91B2-B42BA7877E7E/xxx demoapp.app/mpii-hg128.mlmodelc/model.espresso.net:0
Run Code Online (Sandbox Code Playgroud)
两种模型都非常相似(Conv2D 模型)。使用相同的脚本和版本生成 PyTorch、ONNX 和 onnx-coreml。有效的模型有 1036 层,产生错误的模型有 599 层。它们都使用标准层 - Conv2D、BatchNorm、ReLU、MaxPool 和 Upsample(没有自定义层,也没有 Functional 或 Numpy 的东西)。它们每层都使用相对相同数量的特征。它们基本上遵循相同的结构,除了错误模型在开始时跳过了一个 maxpool 层(因此输出分辨率更高)。
它们都将 256x256 彩色图像作为输入,并以(工作)64x64 和(错误)128x128 像素输出 16 个通道。
该应用程序不会崩溃,但会为错误模型提供垃圾结果。
两种模型都以其原生格式 (PyTorch) 进行训练、评估等。
我不知道Code=5 "processRequest:qos:qIndex:error:: 0x3: Program Inference overflow"错误是什么,谷歌搜索没有产生任何有用的东西,因为我收集“Espresso”和“ANERuntimeEngine”都是私有的 Apple 库。
这个错误信息告诉我什么?我该如何解决?
我可以通过不在仿生芯片上而是在 CPU/GPU 上运行模型来避免此错误消息吗?
任何帮助表示赞赏,谢谢。
这是很多层!
Espresso 是运行 Core ML 模型的 C++ 库。ANERuntimeEngine 与 Apple 神经引擎芯片一起使用。
通过在加载 Core ML 模型时传入MLModelConfigurationwith computeUnitsset to .cpuAndGPU,您可以告诉 Core ML 不要使用神经引擎。
| 归档时间: |
|
| 查看次数: |
938 次 |
| 最近记录: |