This repository has been archived by the owner on Feb 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
onnx_xla_test.py
55 lines (47 loc) · 2.07 KB
/
onnx_xla_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
import onnx.backend.test
from onnxifi_backend import OnnxifiBackend, OnnxifiBackendRep
# This is a pytest magic variable to load extra plugins
pytest_plugins = 'onnx.backend.test.report',
backend_test = onnx.backend.test.BackendTest(OnnxifiBackend(), __name__)
backend_test.include(r'(test_relu' # Test relu.
'|test_softmax' # Test softmax
'|test_batchnorm' # Test BatchNormalization
'|test_gemm' # Test Gemm
'|test_concat' # Test Concat
'|test_unsqueeze' # Test Unsqueeze
'|test_globalaveragepool' #Test GlobalAveragePool
'|test_lrn' # Test LRN
'|test_add' # Test Add
'|test_sub' # Test Sub
'|test_div' # Test Div
'|test_mul' # Test Mul
'|test_sum' # Test Sum
'|test_transpose' #Test Transpose
'|test_maxpool' # Test MaxPool
'|test_basic_conv' # Test Conv
'|test_conv_with'
'|test_average_pool' #Test AveragePool
'|test_dropout' # Test Dropout
'|test_resnet50'
'|test_bvlc_alexnet'
'|test_densenet121'
'|test_inception_v1'
'|test_inception_v2'
# '|test_shufflenet'
'|test_squeezenet'
'|test_vgg19'
'|test_zfnet512'
')')
backend_test.exclude(r'(test_maxpool_with_argmax' # MaxPool with indices not yet supported
')')
# import all test cases at global scope to make them visible to python.unittest
globals().update(backend_test
.enable_report()
.test_cases)
if __name__ == '__main__':
unittest.main()