forked from jiuyuan/InfiniTensor
Add: pytest for import_onnx
This commit is contained in:
parent
0ef74a2145
commit
f88aefb2ca
|
@ -1,12 +0,0 @@
|
|||
from pyinfinitensor import *
|
||||
from import_onnx import *
|
||||
|
||||
import sys
|
||||
|
||||
def main(netPath):
|
||||
runtime = CpuRuntimeObj.getInstance()
|
||||
graphBuilder = GraphBuilderObj(runtime)
|
||||
import_onnx(graphBuilder, netPath)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1])
|
|
@ -0,0 +1,5 @@
|
|||
import pytest
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
retcode = pytest.main()
|
|
@ -0,0 +1,9 @@
|
|||
from pyinfinitensor import *
|
||||
from infinitensor import import_onnx
|
||||
|
||||
|
||||
class Test_ImportOnnx:
|
||||
def test_Netname(self):
|
||||
runtime = CpuRuntimeObj.getInstance()
|
||||
graphBuilder = GraphBuilderObj(runtime)
|
||||
import_onnx(graphBuilder, '/path/to/net')
|
Loading…
Reference in New Issue