pth2onnx.sh 866 Bytes
Newer Older
sunzhq2's avatar
sunzhq2 committed
1
2
3
4
python -m espnet_onnx.export \
  --model_type asr \
  --input ./asr_train_asr_conformer3_raw_char_batch_bins4000000_accum_grad4_sp_valid.acc.ave.zip \
  --tag transformer_lm \
sunzhq2's avatar
sunzhq2 committed
5
6
7
8
  --output /home/sunzhq/workspace/yidong-infer/conformer/onnx_models_1 \
  --apply_optimize \
  --max_seq_len 2048
# --batch_size 24
sunzhq2's avatar
sunzhq2 committed
9
10
11
12
13
14
15
16
17
18
# --model_type {asr,tts}
#                         task type
#   --input INPUT         path to the zip file.
#   --tag TAG             model name.
#   --output OUTPUT       Path to the output model directory.If not provided, then output=${HOME}/.cache/espnet_onnx
#   --apply_quantize      apply quantization
#   --apply_optimize      apply optimization
#   --only_onnxruntime    apply optimization with onnxruntime.
#   --use_gpu             apply optimization for GPU execution
#   --float16             Convert all weights and nodes in float32 to float16