From 5f399dc780301511445447d894648e52bf5f4b5c Mon Sep 17 00:00:00 2001 From: Yuekai Zhang Date: Thu, 7 Sep 2023 05:01:24 -0700 Subject: [PATCH] load checkpoint to decode --- egs/aishell/ASR/decode.sh | 8 ++++++++ egs/aishell/ASR/run.sh | 2 +- egs/aishell/ASR/seamlessm4t/decode.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 egs/aishell/ASR/decode.sh diff --git a/egs/aishell/ASR/decode.sh b/egs/aishell/ASR/decode.sh new file mode 100644 index 000000000..8fb46182f --- /dev/null +++ b/egs/aishell/ASR/decode.sh @@ -0,0 +1,8 @@ + +#export CUDA_VISIBLE_DEVICES="2,3" +#pip install -r seamlessm4t/requirements.txt +#pip install k2==1.24.3.dev20230524+cuda11.8.torch2.0.1 -f https://k2-fsa.github.io/k2/cuda.html +export PYTHONPATH=$PYTHONPATH:/lustre/fsw/sa/yuekaiz/asr/icefall +export PYTHONPATH=$PYTHONPATH:/lustre/fsw/sa/yuekaiz/asr/seamless_communication/src +export TORCH_HOME=/lustre/fsw/sa/yuekaiz/asr/hub +python3 seamlessm4t/decode.py --epoch 3 --exp-dir seamlessm4t/exp diff --git a/egs/aishell/ASR/run.sh b/egs/aishell/ASR/run.sh index cc48e6219..b12b00dc8 100644 --- a/egs/aishell/ASR/run.sh +++ b/egs/aishell/ASR/run.sh @@ -5,4 +5,4 @@ pip install k2==1.24.3.dev20230524+cuda11.8.torch2.0.1 -f https://k2-fsa.github. export PYTHONPATH=$PYTHONPATH:/lustre/fsw/sa/yuekaiz/asr/icefall export PYTHONPATH=$PYTHONPATH:/lustre/fsw/sa/yuekaiz/asr/seamless_communication/src export TORCH_HOME=/lustre/fsw/sa/yuekaiz/asr/hub -torchrun --nproc-per-node 8 seamlessm4t/train2.py --use-fp16 1 --max-duration 300 --base-lr 1e-5 --exp-dir seamlessm4t/exp +torchrun --nproc-per-node 8 seamlessm4t/train2.py --use-fp16 1 --max-duration 300 --base-lr 1e-5 --exp-dir seamlessm4t/exp --start-epoch 4 diff --git a/egs/aishell/ASR/seamlessm4t/decode.py b/egs/aishell/ASR/seamlessm4t/decode.py index 255abba00..0e7779580 100755 --- a/egs/aishell/ASR/seamlessm4t/decode.py +++ b/egs/aishell/ASR/seamlessm4t/decode.py @@ -27,7 +27,7 @@ import k2 import torch import torch.nn as nn from asr_datamodule import AishellAsrDataModule -from conformer import Conformer +#from conformer import Conformer from icefall.char_graph_compiler import CharCtcTrainingGraphCompiler from icefall.checkpoint import average_checkpoints, load_checkpoint