Skip to content

Commit 42ae834

Browse files
committed
add depthwise conv with stride 2
1 parent e138654 commit 42ae834

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed
Binary file not shown.
416 Bytes
Binary file not shown.

testdata/dnn/onnx/generate_onnx_models.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,21 @@ def forward(self, x):
709709
model.eval()
710710
save_data_and_model("depthwiseconv_add", input, model)
711711

712+
class DepthWiseStride2(nn.Module):
713+
714+
def __init__(self):
715+
super(DepthWiseStride2, self).__init__()
716+
self.dconv1 = nn.Conv2d(8, 8, kernel_size=3, stride=2, padding=1, groups=8)
717+
718+
def forward(self, x):
719+
a = self.dconv1(x)
720+
return a
721+
722+
input = Variable(torch.randn(1, 8, 6, 6))
723+
model = DepthWiseStride2()
724+
model.eval()
725+
save_data_and_model("depthwise_stride2", input, model)
726+
712727
class Clip(nn.Module):
713728

714729
def __init__(self):
620 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)