onnx_pytorch.verify contains the distilled knowledge about common ways
model verification can fail, based on our experiences working on
ONNX exports of models. A few key features:
It will run your model multiple times with different inputs,
and give detailed information if (a) the model structure changes,
(b) the embedded parameters change, (c) the Caffe2/PyTorch output
results change.
There is a pretty nice error collecting class which supports
recovery (so that we can report all errors, instead of bailing
out at the first one) and context (so that you can easily
attach messages to all errors.)
We also give the expect test suite good exercise, since we can easily
test for error messages and see how improvements affect what is printed.
onnx_pytorch.verify contains the distilled knowledge about common ways model verification can fail, based on our experiences working on ONNX exports of models. A few key features:
It will run your model multiple times with different inputs, and give detailed information if (a) the model structure changes, (b) the embedded parameters change, (c) the Caffe2/PyTorch output results change.
There is a pretty nice error collecting class which supports recovery (so that we can report all errors, instead of bailing out at the first one) and context (so that you can easily attach messages to all errors.)
We also give the expect test suite good exercise, since we can easily test for error messages and see how improvements affect what is printed.
Requires a PyTorch update tracked at https://github.com/pytorch/pytorch/pull/2781
Signed-off-by: Edward Z. Yang ezyang@fb.com
Supersedes https://github.com/ezyang/pytorch/pull/209 and https://github.com/ezyang/pytorch/pull/204