Skip to content

Commit df3438f

Browse files
committed
w
1 parent 1d22e09 commit df3438f

3 files changed

Lines changed: 0 additions & 37 deletions

File tree

tools/pnnx/tests/onnx/test_onnx_layout_ops.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,6 @@ def test():
7777
import os
7878
os.system("../../src/pnnx test_onnx_layout_ops.onnx inputshape=[1,12,16,14] inputshape2=[1,12,48,66]")
7979

80-
with open("test_onnx_layout_ops.ncnn.param") as f:
81-
lines = f.readlines()
82-
if not any(line.startswith("Permute") and " out17 " in line and "0=2" in line for line in lines):
83-
return False
84-
if not any(line.startswith("ExpandDims") and " out10 " in line and "-23303=2,2,0" in line for line in lines):
85-
return False
86-
if not any(line.startswith("ExpandDims") and " out12 " in line and "-23303=2,1,2" in line for line in lines):
87-
return False
88-
89-
with open("test_onnx_layout_ops_ncnn.py") as f:
90-
if "out17.numpy(batch_index=233)" in f.read():
91-
return False
92-
9380
# pnnx inference
9481
import test_onnx_layout_ops_pnnx
9582
b = test_onnx_layout_ops_pnnx.test_inference()

tools/pnnx/tests/test_Tensor_reshape.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,6 @@ def test():
5858
import os
5959
os.system("../src/pnnx test_Tensor_reshape.pt inputshape=[1,3,16],[1,5,9,11],[14,8,5,9,10],[210],[2,3,5,7],[280],[2,3,5,7],[210]")
6060

61-
with open("test_Tensor_reshape.ncnn.param") as f:
62-
lines = f.readlines()
63-
if not any(line.startswith("Reshape") and "12=1" in line for line in lines):
64-
return False
65-
if not any(line.startswith("Reshape") and "12=2" in line for line in lines):
66-
return False
67-
if not any(line.startswith("Permute") for line in lines):
68-
return False
69-
if not any(line.startswith("Reshape") and "0=140" in line and "12=" not in line for line in lines):
70-
return False
71-
if any(line.startswith("Reshape") and "12=2" in line and "=-1" in line for line in lines):
72-
return False
73-
7461
# pnnx inference
7562
import test_Tensor_reshape_pnnx
7663
b = test_Tensor_reshape_pnnx.test_inference()

tools/pnnx/tests/test_torch_flatten.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,6 @@ def test():
4040
import os
4141
os.system("../src/pnnx test_torch_flatten.pt inputshape=[1,3,16],[1,5,9,11],[14,8,5,9,10],[2,3,5,7]")
4242

43-
with open("test_torch_flatten.ncnn.param") as f:
44-
lines = f.readlines()
45-
if sum(1 for line in lines if line.startswith("Reshape") and "12=1" in line) != 2:
46-
return False
47-
if not any(line.startswith("Reshape") and "0=-1" in line and "12=1" in line for line in lines):
48-
return False
49-
if not any(line.startswith("Reshape") and "0=7" in line and "1=5" in line and "2=-1" in line and "12=1" in line for line in lines):
50-
return False
51-
if not any(line.startswith("Reshape") and "0=35" in line and "1=4" in line and "2=" not in line for line in lines):
52-
return False
53-
5443
# pnnx inference
5544
import test_torch_flatten_pnnx
5645
b = test_torch_flatten_pnnx.test_inference()

0 commit comments

Comments
 (0)