machine-translation - 使用 MVN 操作编译 InferenceEngine Openvino 失败
问题描述
我正在将MBART模型从 HuggingFace Transformer 转换为 OpenVino IF 格式,并且我已经“成功”地将原始 pytorch 模型图分解为 3 个单独的 ONNX 模型。然后,我使用mo.py
将 onnx 模型转换为 IF 格式模型,以在 openvino 中为“MYRIAD”神经计算棒 2 使用推理引擎。它本质上是两个编码器和一个解码器。我正在尝试测试第一个编码器模型,以查看简单的推理引擎负载是否有效。
我收到以下错误:
[ 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
图层,它看起来像:
<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>
阅读MVN文档,并尝试在不走运的情况下将各种值port id="1"
置于暗淡之下。不幸的是,我不完全理解它警告我要修复它的内容。
解决方案
OpenVINO 似乎还不支持您与 Div_25 层一起使用的 ONNX 模型。您可以参考Supported Framework 层上的这些文档。
推荐阅读
- laravel - Laravel returned error not shown in front-end
- elasticsearch - 在 Elastic Search 上添加新字段时发生错误
- docker - 自动拉取 docker 镜像容器
- r - 如何在 R 的传单地图中删除属性
- r - 用于比较的嵌套圆环图
- r - 将计数数据转换为许多二进制记录
- javascript - 如何为扩展运算符创建 polyfill
- python - 困惑如何使用 Django 创建评估表单
- reporting-services - 如何从 ssrs 的平均值中获得正确的平均值结果?
- javascript - php递归地从所有子文件夹中读取匹配模式的文件