File size: 449 Bytes
be2715b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import onnx 
"""
Unit test for onnx model
"""
onnx_model_rn50 = onnx.load("onnx_model/lvmmed_rn50.onnx")
try:
    onnx.checker.check_model(onnx_model_rn50)
    print("[Unit test] RN50 onnx passed!")
except:
    print("[Unit test] RN50 onnx failed!")

onnx_model_vit = onnx.load("onnx_model/lvmmed_vit.onnx")
try:
    onnx.checker.check_model(onnx_model_vit)
    print("[Unit test] ViT onnx passed!")
except:
    print("[Unit test] ViT onnx failed!")