@@ -20,10 +20,17 @@ pytorch_model = ConvertModel(onnx_model)
2020```
2121
2222Currently supported and tested models from [ onnx_zoo] ( https://github.com/onnx/models ) :
23- - MobileNet
24- - ResNet
25- - ShuffleNet
26- - Bert
23+ - [ MobileNet] ( https://github.com/onnx/models/tree/master/vision/classification/mobilenet )
24+ - [ ResNet] ( https://github.com/onnx/models/tree/master/vision/classification/resnet )
25+ - [ ShuffleNet_V2] ( https://github.com/onnx/models/tree/master/vision/classification/shufflenet )
26+ - [ BERT-Squad] ( https://github.com/onnx/models/tree/master/text/machine_comprehension/bert-squad )
27+ - [ EfficientNet-Lite4] ( https://github.com/onnx/models/tree/master/vision/classification/efficientnet-lite4 )
28+ - [ Fast Neural Style Transfer] ( https://github.com/onnx/models/tree/master/vision/style_transfer/fast_neural_style )
29+ - [ Super Resolution] ( https://github.com/onnx/models/tree/master/vision/super_resolution/sub_pixel_cnn_2016 )
30+ - [ YOLOv4] ( https://github.com/onnx/models/tree/master/vision/object_detection_segmentation/yolov4 )
31+ (Not exactly the same, nearest neighbour interpolation in pytorch differs)
32+ - [ U-net] ( https://pytorch.org/hub/mateuszbuda_brain-segmentation-pytorch_unet/ )
33+ (Converted from pytorch to onnx and then back)
2734
2835## Limitations
2936Known current version limitations are:
@@ -49,4 +56,14 @@ Install it into pre-commit hook to always commit nicely formatted code:
4956
5057### Testing
5158[ Pytest] ( https://docs.pytest.org/en/latest/ ) and [ tox] ( https://tox.readthedocs.io/en/latest/ ) .
52- ``` tox ```
59+ ``` tox ```
60+ #### Test fixtures
61+ To test the complete conversion of an onnx model download pre-trained models:
62+ ``` ./download_fixtures.sh ```
63+ Use flag ` --all ` to download more models.
64+ Add any custom models to ` ./fixtures ` folder to test their conversion.
65+
66+ ### Debugging
67+ Set ` ConvertModel(..., debug=True) ` to compare each converted
68+ activation from pytorch with the activation from onnxruntime.
69+ This helps identify where in the graph the activations start to differ.
0 commit comments