Skip to content

Commit c3d6342

Browse files
authored
Merge pull request #808 from l-bat:issue_18350
2 parents ff9268d + 15428d5 commit c3d6342

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed
176 Bytes
Binary file not shown.
176 Bytes
Binary file not shown.

testdata/dnn/onnx/generate_onnx_models.py

+9
Original file line numberDiff line numberDiff line change
@@ -977,3 +977,12 @@ def forward(self, x, skip=None):
977977
x = Variable(torch.rand(1, 2, 2, 2))
978978
model = ResizeConv(2, 0, 2)
979979
save_data_and_model("resize_opset11_torch1.6", x, model, 11)
980+
981+
class Scale(nn.Module):
982+
def forward(self, x):
983+
w = torch.mean(x, axis=(2, 3), keepdim=True)
984+
return w * x
985+
986+
x = Variable(torch.randn(1, 3, 2, 2))
987+
model = Scale()
988+
save_data_and_model("scale", x, model)

testdata/dnn/onnx/models/scale.onnx

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
pytorch1.6:�
2+
@
3+
01 ReduceMean_0"
4+
ReduceMean*
5+
axes@@�*
6+
keepdims�
7+

8+
1
9+
02Mul_1"Multorch-jit-exportZ
10+
0
11+

12+

13+

14+

15+
b
16+
2
17+

18+

19+

20+

21+
B

0 commit comments

Comments
 (0)