Skip to content

Commit

Permalink
Merge pull request alibaba#1943 from jokerz0624/bug_fix_converter
Browse files Browse the repository at this point in the history
fix(converter): fix one bug of GridSampleOnnxClassic
  • Loading branch information
jxt1234 authored Jun 1, 2022
2 parents c685d6a + 3196e4a commit 007a6e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/converter/source/onnx/GridSampleOnnxClassic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ void GridSampleOnnxClassic::run(MNN::OpT *dstOp, const onnx::NodeProto *onnxNode
}
if (attributeName == "padding_mode") {
gridSampleParam->paddingMode = MNN::BorderMode_ZEROS;
if (attributeProto.name() == "zeros") {
if (attributeProto.s() == "zeros") {
gridSampleParam->paddingMode = MNN::BorderMode_ZEROS;
} else if (attributeProto.name() == "border") {
} else if (attributeProto.s() == "border") {
gridSampleParam->paddingMode = MNN::BorderMode_CLAMP;
} else if (attributeProto.name() == "reflection") {
} else if (attributeProto.s() == "reflection") {
gridSampleParam->paddingMode = MNN::BorderMode_REFLECTION;
} else {
LOG_INFO.stream() << "Don't support padding_mode " << attributeProto.s();
Expand Down

0 comments on commit 007a6e8

Please sign in to comment.