Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following error occured when convert models including
FasterRCNN-ResNet101
FasterRCNN-ResNet50
MaskRCNN-ResNet50
Analysis: TransPirDataType2OnnxDataType doesnot support
phi::DataType::UNDEFINED
Solution: Add mapping from
phi::DataType::UNDEFINED
toP2ODataType::UNDEFINED
and mapping fromP2ODataType::UNDEFINED
toONNX_NAMESPACE::TensorProto::UNDEFINED
Note
PaddleDataTypeSize
函数,解除了paddle2onnx::framework::proto::VarType_Type
与P2ODataType
中定义的类型顺序强绑定,否则会导致权重文件的读取错误paddle2onnx::framework::proto::VarType_Type
作为TensorInfo.dtype
,而TensorInfo.dtype
的设计初衷是使用P2ODataType
,因此旧IR下``paddle2onnx::framework::proto::VarType_Type和
P2ODataType`的类型顺序必须是强绑定的,不能在`P2ODataType` 中插入一个新的类型,目前解决方案是将`P2ODataType` 中的一个闲置的位置替换为UNDEFINED