简体   繁体   English

没有先验层和 softmax 层的 YOLACT onnx 的 xrunc coreml model 错误

[英]xrunc coreml model error for YOLACT onnx with no priors layer and softmax layer

I have convert the YOLACT pytorch model to onnx with no softmax and priors layers.我已将 YOLACT pytorch model 转换为 onnx,没有 softmax 和先验层。 And I try to convert onnx to coreml afterward.然后我尝试将 onnx 转换为 coreml。 The terminal shows it's done with no mistake.终端显示它没有错误地完成。 It also display model compilation done, and no error as below.它还显示 model 编译完成,并且没有错误如下。

210/211: Converting Node Type Concat 211/211: Converting Node Type Concat Translation to CoreML spec completed. Now compiling the CoreML model. Model Compilation done.

But as I compile coreml model on macos, error shows:但是当我在macos上编译coreml model时,错误显示:

xcrun coremlc compile yolact_test_nosoftmax_simplify.mlmodel

coremlc: Error: compiler error: Espresso exception: Invalid blob shape generic_elementwise_kernel: cannot broadcast [18, 18, 128, 1, 399] and [35, 35, 128, 1, 399]

I have no idea how to debug right now.我现在不知道如何调试。 Any suggestion will be appreciated.任何建议将不胜感激。

There is an operation in your model that tries to apply an operation to a tensor of size (18, 18, 128, 1, 399) and a tensor of size (35, 35, 128, 1, 399).您的 model 中有一个操作尝试将操作应用于大小为 (18, 18, 128, 1, 399) 的张量和大小为 (35, 35, 128, 1, 399) 的张量。 These two tensor shapes are not compatible, hence the error message.这两个张量形状不兼容,因此出现错误消息。

To solve this, you need to find out at which point in your model this happens and then fix the issue.要解决此问题,您需要找出 model 中的哪个点发生这种情况,然后解决问题。 It might be something that went wrong with the PyTorch -> ONNX conversion, or that goes wrong with the ONNX -> Core ML conversion. PyTorch -> ONNX 转换可能出现问题,或者 ONNX -> Core ML 转换出现问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CoreML:为ONNX RandomNormal创建自定义图层 - CoreML: creating a custom layer for ONNX RandomNormal 将 pytorch model 转换为 Coreml 时出错。 层有 1 个输入,但预计至少有 2 个 - Error while converting pytorch model to Coreml. Layer has 1 inputs but expects at least 2 用两个输入实现CoreML自定义层 - Implement CoreML Custom Layer With Two Inputs CoreML自定义层:使用金属着色器进行像素化规范化 - CoreML custom layer: Pixelwise Normalization with Metal Shaders 自定义 CoreML output 层,对 multiArray output 求和 - Custom CoreML output layer that sums multiArray output 用于coreML的自定义层的MLTexture数组的金属数据结构 - metal data structure of MLTexture array for coreML's custom layer 准备CoreML模型时出错:“ <something> “不支持CoreML代码生成 - Error preparing CoreML model: “<something>” is not supported for CoreML code generation 使用 onnx_coreml 转换节点类型切片时出错 - Error when Converting Node Type Slice with onnx_coreml 尝试将简单卷积模型转换为 CoreML 时出错 - Error trying to convert simple convolutional model to CoreML CoreML:有时会出现“意外错误处理模型”错误 - CoreML : “Unexpected error processing model” error sometimes occurring
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM