20
20
run_tests ,
21
21
skipIfNoLapack ,
22
22
skipIfUnsupportedMinOpsetVersion ,
23
- skipScriptTest ,
23
+ disableScriptTest ,
24
24
)
25
25
from torchvision .models import shufflenet_v2_x1_0
26
26
from torchvision .models .alexnet import alexnet
@@ -82,7 +82,7 @@ def test_prelu(self):
82
82
x = Variable (torch .randn (BATCH_SIZE , 3 , 224 , 224 ).fill_ (1.0 ))
83
83
self .exportTest (PReluNet (), x )
84
84
85
- @skipScriptTest ()
85
+ @disableScriptTest ()
86
86
def test_concat (self ):
87
87
input_a = Variable (torch .randn (BATCH_SIZE , 3 ))
88
88
input_b = Variable (torch .randn (BATCH_SIZE , 3 ))
@@ -93,12 +93,12 @@ def test_permute(self):
93
93
x = Variable (torch .randn (BATCH_SIZE , 3 , 10 , 12 ))
94
94
self .exportTest (PermuteNet (), x )
95
95
96
- @skipScriptTest ()
96
+ @disableScriptTest ()
97
97
def test_embedding_sequential_1 (self ):
98
98
x = Variable (torch .randint (0 , 10 , (BATCH_SIZE , 3 )))
99
99
self .exportTest (EmbeddingNetwork1 (), x )
100
100
101
- @skipScriptTest ()
101
+ @disableScriptTest ()
102
102
def test_embedding_sequential_2 (self ):
103
103
x = Variable (torch .randint (0 , 10 , (BATCH_SIZE , 3 )))
104
104
self .exportTest (EmbeddingNetwork2 (), x )
@@ -152,7 +152,7 @@ def test_resnet(self):
152
152
x = Variable (torch .randn (BATCH_SIZE , 3 , 224 , 224 ).fill_ (1.0 ))
153
153
self .exportTest (toC (resnet50 ()), toC (x ), atol = 1e-6 )
154
154
155
- @skipScriptTest ( min_opset_version = 15 ) # None type in outputs
155
+ @disableScriptTest ( ) # None type in outputs
156
156
def test_inception (self ):
157
157
x = Variable (torch .randn (BATCH_SIZE , 3 , 299 , 299 ))
158
158
self .exportTest (toC (inception_v3 ()), toC (x ))
@@ -175,14 +175,14 @@ def test_densenet(self):
175
175
x = Variable (torch .randn (BATCH_SIZE , 3 , 224 , 224 ).fill_ (1.0 ))
176
176
self .exportTest (toC (densenet121 ()), toC (x ), rtol = 1e-2 , atol = 1e-5 )
177
177
178
- @skipScriptTest ()
178
+ @disableScriptTest ()
179
179
def test_dcgan_netD (self ):
180
180
netD = _netD (1 )
181
181
netD .apply (weights_init )
182
182
input = Variable (torch .empty (bsz , 3 , imgsz , imgsz ).normal_ (0 , 1 ))
183
183
self .exportTest (toC (netD ), toC (input ))
184
184
185
- @skipScriptTest ()
185
+ @disableScriptTest ()
186
186
def test_dcgan_netG (self ):
187
187
netG = _netG (1 )
188
188
netG .apply (weights_init )
@@ -239,7 +239,7 @@ def test_qat_resnet_per_channel(self):
239
239
240
240
self .exportTest (toC (qat_resnet50 ), toC (x ))
241
241
242
- @skipScriptTest ( min_opset_version = 15 ) # None type in outputs
242
+ @disableScriptTest ( ) # None type in outputs
243
243
def test_googlenet (self ):
244
244
x = Variable (torch .randn (BATCH_SIZE , 3 , 224 , 224 ).fill_ (1.0 ))
245
245
self .exportTest (toC (googlenet ()), toC (x ), rtol = 1e-3 , atol = 1e-5 )
@@ -252,7 +252,7 @@ def test_mobilenet(self):
252
252
x = Variable (torch .randn (BATCH_SIZE , 3 , 224 , 224 ).fill_ (1.0 ))
253
253
self .exportTest (toC (mobilenet_v2 ()), toC (x ), rtol = 1e-3 , atol = 1e-5 )
254
254
255
- @skipScriptTest () # prim_data
255
+ @disableScriptTest () # prim_data
256
256
def test_shufflenet (self ):
257
257
x = Variable (torch .randn (BATCH_SIZE , 3 , 224 , 224 ).fill_ (1.0 ))
258
258
self .exportTest (toC (shufflenet_v2_x1_0 ()), toC (x ), rtol = 1e-3 , atol = 1e-5 )
0 commit comments