Skip to content

Commit 4ec3624

Browse files
committed
Added testdata for ONNX Mul
1 parent 6927bec commit 4ec3624

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
@@ -952,3 +952,12 @@ def forward(self, x):
952952
x = Variable(torch.randn(1, 3, 2, 2))
953953
model = ReduceMax()
954954
save_data_and_model("reduce_max", x, model)
955+
956+
class Scale(nn.Module):
957+
def forward(self, x):
958+
w = torch.mean(x, axis=(2, 3), keepdim=True)
959+
return w * x
960+
961+
x = Variable(torch.randn(1, 3, 2, 2))
962+
model = Scale()
963+
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)