Skip to content

Commit eba90b7

Browse files
guangy10facebook-github-bot
authored andcommitted
Updated instructions to genenrate and run example models
Summary: Added Emformer Rnnt and Torchvision Vit to README.md Reviewed By: kimishpatel Differential Revision: D48282779 fbshipit-source-id: e3cd1203b8ff5e3dcba54023a0c6c87932c4ccb4
1 parent 5d2e43c commit eba90b7

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

examples/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,23 @@ cd executorch # To the top level dir
3434

3535
bash examples/install_requirements.sh
3636

37+
# To get a list of example models
38+
python3 -m examples.export.export_example -h
39+
40+
# To generate a specific pte model
3741
python3 -m examples.export.export_example --model_name="mv2" # for MobileNetv2
3842

3943
# This should generate ./mv2.pte file, if successful.
4044
```
4145

46+
Use `-h` (or `--help`) to see all the supported models.
47+
4248
3. Once we have the model binary (pte) file, then let's run it with Executorch runtime using the `executor_runner`.
4349

4450
```bash
4551
buck2 run examples/executor_runner:executor_runner -- --model_path mv2.pte
4652
```
4753

48-
For MobileNetv3, change the model name and the corrosponding binary filename from "mv2" to "mv3".
49-
5054
## Dependencies
5155

5256
Various models listed in this directory have dependencies on some other packages, e.g. torchvision, torchaudio.

examples/export/export_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def export_to_pte(model_name, model, example_inputs):
3838
"-m",
3939
"--model_name",
4040
required=True,
41-
help=f"Provide model name. Valid ones: {list(MODEL_NAME_TO_MODEL.keys())}",
41+
help=f"provide a model name. Valid ones: {list(MODEL_NAME_TO_MODEL.keys())}",
4242
)
4343

4444
args = parser.parse_args()

examples/install_requirements.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
# The version in this file will be the correct version for the
1818
# corresponsing version of the repo.
1919

20-
TORCH_VISION_VERSION=0.16.0.dev20230810
20+
TORCH_VISION_VERSION=0.16.0.dev20230813
2121
pip install --force-reinstall --pre torchvision=="${TORCH_VISION_VERSION}" -i https://download.pytorch.org/whl/nightly/cpu
2222

23-
TORCH_AUDIO_VERSION=2.1.0.dev20230810
23+
TORCH_AUDIO_VERSION=2.1.0.dev20230813
2424
pip install --force-reinstall --pre torchaudio=="${TORCH_AUDIO_VERSION}" -i https://download.pytorch.org/whl/nightly/cpu

0 commit comments

Comments
 (0)