无法使用 MVN 操作编译 InferenceEngine Openvino

问题描述

我正在将 MBART 模型从 HuggingFace Transformer 转换为 OpenVino IF 格式,并且我已经“成功地”将原始 pytorch 模型图分解为 3 个单独的 ONNX 模型。然后,我使用 kill(getppid(),SIGUSR2); 将 onnx 模型转换为 IF 格式模型,以在 openvino 中使用推理引擎“MYRIAD”神经计算棒 2 。它本质上是两个编码器和一个解码器。我正在尝试测试第一个编码器模型,以查看简单的推理引擎负载是否有效。

我收到以下错误

mo.py

我检查了 [ INFO ] Loading Inference Engine [ INFO ] Loading network: [ INFO ] c:\protoc\models\translator\encoder\model.xml [ INFO ] Device info: [ INFO ] MYRIAD [ INFO ] MKLDNNPlugin version ......... 2.1 [ INFO ] Build ........... 2021.3.0-2774-d6ebaa2cd8e-refs/pull/4731/head [ INFO ] Inputs number: 2 [ INFO ] Input name: attention_mask [ INFO ] Input shape: [1,92] .... RuntimeError: Failed to compile layer "Div_25": Unsupported combination of indices in layer "Div_25". Only accross channel and full batch supported. 层,它看起来像:

Div_25

阅读 MVN 文档,并尝试将 <layer id="30" name="Div_25" type="MVN" version="opset6"> <data eps="9.999999747378752e-06" eps_mode="inside_sqrt" normalize_variance="true"/> <input> <port id="0"> <dim>1</dim> <dim>92</dim> <dim>1024</dim> </port> <port id="1"> <dim>1</dim> </port> </input> <output> <port id="2" precision="FP32" names="231"> <dim>1</dim> <dim>92</dim> <dim>1024</dim> </port> </output> </layer> 的各种值置于 dim 下,但不幸的是。不幸的是,我不完全理解它警告我要修复它的内容

解决方法

您与 Div_25 层一起使用的 ONNX 模型似乎尚不受 OpenVINO 支持。您可以在 Supported Framework layer 上参考这些文档。

,

请尝试使用 MVN-1 操作,因为它将迎合跨渠道标志。我们建议您使用最近发布的 OpenVINO 2021.4。