Skip to content

Commit bc3cbea

Browse files
committed
catch onnx checker error
1 parent f6e9ef1 commit bc3cbea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/tvm/relay/frontend/onnx.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,10 @@ def from_onnx(model,
11401140
checker.check_model(model)
11411141
except ImportError:
11421142
pass
1143+
except onnx.onnx_cpp2py_export.checker.ValidationError as e:
1144+
import warnings
1145+
# the checker is a bit violent about errors, so simply print warnings here
1146+
warnings.warn(e)
11431147
g = GraphProto(shape, dtype)
11441148
graph = model.graph
11451149
try:

0 commit comments

Comments
 (0)