Skip to content

Commit 95350c2

Browse files
committed
Merge pull request #580 from dkurt:onnx_upsample_unsqueeze
2 parents f02cf5b + 03c482f commit 95350c2

File tree

7 files changed

+32
-0
lines changed

7 files changed

+32
-0
lines changed
176 Bytes
Binary file not shown.
104 Bytes
Binary file not shown.
464 Bytes
Binary file not shown.
104 Bytes
Binary file not shown.

testdata/dnn/onnx/generate_onnx_models.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,20 @@ def forward(self, image):
246246
input = Variable(torch.randn(1, 2, 3, 4))
247247
model = DynamicReshapeNet()
248248
save_data_and_model("dynamic_reshape", input, model)
249+
250+
input = Variable(torch.randn(1, 2, 3, 4))
251+
resize = nn.Upsample(scale_factor=2, mode='nearest')
252+
save_data_and_model("resize_nearest", input, resize)
253+
254+
class Unsqueeze(nn.Module):
255+
256+
def __init__(self):
257+
super(Unsqueeze, self).__init__()
258+
259+
def forward(self, x):
260+
return torch.unsqueeze(x, dim=1)
261+
262+
input = Variable(torch.randn(1, 2, 3))
263+
model = Unsqueeze()
264+
model.eval()
265+
save_data_and_model("unsqueeze", input, model)
170 Bytes
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
pytorch0.4:h
2+

3+
01" Unsqueeze*
4+
axes@�torch-jit-exportZ
5+
0
6+

7+

8+

9+
b
10+
1
11+

12+

13+

14+

15+
B

0 commit comments

Comments
 (0)