See https://github.com/k2-fsa/icefall/pull/1014
#1
by
csukuangfj
- opened
exp/export-onnx.sh
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env bash
|
2 |
+
|
3 |
+
# We use the model from
|
4 |
+
# https://huggingface.co/ezerhouni/icefall-librispeech-rnn-lm/tree/main
|
5 |
+
# as an example
|
6 |
+
|
7 |
+
export CUDA_VISIBLE_DEVICES=
|
8 |
+
|
9 |
+
if [ ! -f ./icefall-librispeech-rnn-lm/exp/pretrained.pt ]; then
|
10 |
+
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/ezerhouni/icefall-librispeech-rnn-lm
|
11 |
+
pushd icefall-librispeech-rnn-lm/exp
|
12 |
+
git lfs pull --include "pretrained.pt"
|
13 |
+
ln -s pretrained.pt epoch-99.pt
|
14 |
+
popd
|
15 |
+
fi
|
16 |
+
|
17 |
+
python3 ./export-onnx.py \
|
18 |
+
--exp-dir ./icefall-librispeech-rnn-lm/exp \
|
19 |
+
--epoch 99 \
|
20 |
+
--avg 1 \
|
21 |
+
--vocab-size 500 \
|
22 |
+
--embedding-dim 2048 \
|
23 |
+
--hidden-dim 2048 \
|
24 |
+
--num-layers 3 \
|
25 |
+
--tie-weights 1
|
26 |
+
|
exp/no-state-epoch-99-avg-1.int8.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c0d6159f752d9e0f3b48bc3337855d32f66938448a30c6af7c02744dc0bd71be
|
3 |
+
size 102921898
|
exp/no-state-epoch-99-avg-1.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8658c649b974c4ca35c446f04d3a5cde0aaec69c9d778b5f70cf4ba44cc7eac6
|
3 |
+
size 411050818
|