mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Update docs/Model_Test.md (#11466)
Update the instructions of how to get test models.
This commit is contained in:
parent
2a17958b34
commit
ee3f2f4ebf
1 changed files with 13 additions and 20 deletions
|
|
@ -1,27 +1,20 @@
|
||||||
ONNX has a collection of standard tests. This document describes how to run these tests through a C++ program named 'onnx_test_runner' in this repo. You could also run these test through onnxruntime python binding, which would be much easier to setup, but, a bit harder to debug issues.
|
ONNX has a collection of standard tests. This document describes how to run these tests through a C++ program named 'onnx_test_runner' in this repo. You could also run these test through onnxruntime python binding, which would be much easier to setup, but, a bit harder to debug issues.
|
||||||
|
|
||||||
# Get the test data
|
# Get the test data
|
||||||
You should have:
|
```
|
||||||
1. onnx single node test data
|
git submodule update --init --recursive
|
||||||
2. onnx model zoo models
|
pushd .
|
||||||
|
cd cmake/external/emsdk
|
||||||
|
./emsdk install latest
|
||||||
|
./emsdk activate latest
|
||||||
|
source ./emsdk_env.sh
|
||||||
|
popd
|
||||||
|
cd js
|
||||||
|
npm install
|
||||||
|
npm run prepare-node-tests
|
||||||
|
```
|
||||||
|
|
||||||
## Install onnx python package
|
In addition to that, You can get more test models with their test data from https://github.com/onnx/models .
|
||||||
You can get onnx python package from [pypi](https://pypi.org/). However, if you are a onnxruntime developer, you may need to work on a cutting edge ONNX version. In this case, you need to build and install ONNX from source code.
|
|
||||||
|
|
||||||
### Install ONNX from source code
|
|
||||||
1. (windows) set ONNX_ML=1
|
|
||||||
(linux) export ONNX_ML=1
|
|
||||||
2. Install protobuf and put protoc into your PATH environment. When you compile protobuf, it's better to only enable the static libraries.
|
|
||||||
3. run "python setup.py bdist_wheel" and "pip install dist/*.whl"
|
|
||||||
|
|
||||||
## Generate node test data
|
|
||||||
$ python3 -m onnx.backend.test.cmd_tools generate-data -o <dest_folder>
|
|
||||||
e.g.
|
|
||||||
python3 -m onnx.backend.test.cmd_tools generate-data -o C:\testdata
|
|
||||||
|
|
||||||
|
|
||||||
## Get more models
|
|
||||||
Download https://onnxruntimetestdata.blob.core.windows.net/models/20190419.zip and unzip it.
|
|
||||||
|
|
||||||
|
|
||||||
# Compile onnx_test_runner and run the tests
|
# Compile onnx_test_runner and run the tests
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue