Skip to content

Commit 8f5a6e9

Browse files
committed
[opt:fuse_pad_into_conv] remove auto_pad, when use pads
Signed-off-by: 462630221 <[email protected]>
1 parent c40d3c0 commit 8f5a6e9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

onnxoptimizer/passes/fuse_pad_into_conv.h

+5
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ struct FusePadIntoConv final : public PredicateBasedPass {
165165
conv_pads[conv_pads_size / 2 + j] += pads[pads_size / 2 + i];
166166
}
167167

168+
// Clean the auto_pad
169+
if (conv->hasAttribute(Symbol("auto_pad"))){
170+
conv->removeAttribute(Symbol("auto_pad"));
171+
}
172+
168173
conv->is_(kpads, std::move(conv_pads));
169174
conv->replaceInput(0, pad->inputs()[0]);
170175
pad->destroy();

0 commit comments

Comments
 (0)