mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Updated PyTorch ONNX exporter (markdown)
@ -253,9 +253,9 @@ For example:
|
||||
|
||||
```sh
|
||||
# run test for opset 11
|
||||
python test/onnx/test_pytorch_onnx_onnxruntime.py TestONNXRuntime_opset11.test_arithmetic_prim_bool
|
||||
python -m pytest test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset11::test_arithmetic_prim_bool
|
||||
# run test for opset 9
|
||||
python test/onnx/test_pytorch_onnx_onnxruntime.py TestONNXRuntime_opset9.test_arithmetic_prim_bool
|
||||
python -m pytest test/onnx/test_pytorch_onnx_onnxruntime.py::TestONNXRuntime_opset9::test_arithmetic_prim_bool
|
||||
```
|
||||
|
||||
An example of adding unit tests for a new symbolic function: [Add binary_cross_entropy_with_logits op](https://github.com/pytorch/pytorch/pull/49675)
|
||||
@ -263,7 +263,7 @@ An example of adding unit tests for a new symbolic function: [Add binary_cross_e
|
||||
You can use `pytest` to run tests in parallel and generate a coverage report.
|
||||
|
||||
```sh
|
||||
pytest -n auto --cov --cov-report "xml:test/coverage.xml" test/onnx/test_pytorch_onnx_onnxruntime.py
|
||||
python -m pytest -n auto --cov --cov-report "xml:test/coverage.xml" test/onnx/test_pytorch_onnx_onnxruntime.py
|
||||
```
|
||||
|
||||
# Links
|
||||
|
Reference in New Issue
Block a user