Skip to content

Commit 96c58ce

Browse files
liwchanglinkerzhang
authored andcommitted
Fix shape inference when auto_pad is notset again (#1830)
Treat auto_pad notset as no auto_pad, since our newest Modelzoo onnx models still make auto_pad notset instead of removing it.
1 parent 873ddbb commit 96c58ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

onnx/defs/nn/defs.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ void convPoolTypeAndShapeInference(
5252
}
5353

5454
// don't bother with legacy auto_pad for now
55-
if (ctx.getAttribute("auto_pad")) {
55+
const auto* auto_pad_attr = ctx.getAttribute("auto_pad");
56+
if ((nullptr != auto_pad_attr) && (auto_pad_attr->s() != "NOTSET")) {
5657
return;
5758
}
5859

0 commit comments

Comments
 (0)