OFA-Sys / Chinese-CLIP

Chinese version of CLIP which achieves Chinese cross-modal retrieval and representation generation.
MIT License
4.32k stars 448 forks source link

onnx模型转换报错 #328

Closed guanxiaoguan closed 1 month ago

guanxiaoguan commented 2 months ago

onnx模型转magicmind模型报错,parser代码如下

from magicmind.python.runtime import ModelKind, Network
from magicmind.python.runtime.parser import Parser
parser = Parser(ModelKind.kOnnx)
network = Network()
parser.parse(network,"onnx/vit-b-16.txt.fp32.onnx")

报错信息: error: 'onnx.Unsqueeze' op requires a single operand 2024-07-14 05:28:21.344356: ERROR: magicmind/translation/onnx/module_loader.cc:61] Failed to verify onnx mlir module error: 'onnx.Unsqueeze' op requires a single operand error: 'onnx.Unsqueeze' op requires a single operand error: 'onnx.Unsqueeze' op requires a single operand error: 'onnx.Unsqueeze' op requires a single operand 2024-07-14 05:28:21.361150: ERROR: magicmind/cc/internal/mm_parser_core.h:57] Internal: Onnx mlir graph is illegal

请问这是什么原因呢

guanxiaoguan commented 1 month ago

已经解决了,寒武纪仅支持导出ONNX opset_version=11