mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-08 09:32:20 +00:00
Rename train2.py to avoid confusion (#1386)
This commit is contained in:
parent
59c943878f
commit
666d69b20d
@ -51,6 +51,8 @@ for method in modified_beam_search fast_beam_search; do
|
||||
$repo/test_wavs/DEV_T0000000002.wav
|
||||
done
|
||||
|
||||
rm -rf $repo
|
||||
|
||||
log "==== Test icefall-asr-multi-zh-hans-zipformer-ctc-2023-10-24 ===="
|
||||
repo_url=https://huggingface.co/zrjin/icefall-asr-multi-zh-hans-zipformer-ctc-2023-10-24/
|
||||
|
||||
@ -92,4 +94,4 @@ for method in modified_beam_search fast_beam_search; do
|
||||
$repo/test_wavs/DEV_T0000000000.wav \
|
||||
$repo/test_wavs/DEV_T0000000001.wav \
|
||||
$repo/test_wavs/DEV_T0000000002.wav
|
||||
done
|
||||
done
|
||||
|
@ -261,10 +261,9 @@ if [ $stage -le 8 ] && [ $stop_stage -ge 8 ]; then
|
||||
fi
|
||||
|
||||
if [ ! -f $lang_char_dir/HLG.fst ]; then
|
||||
lang_phone_dir=data/lang_phone
|
||||
./local/prepare_lang_fst.py \
|
||||
--lang-dir $lang_phone_dir \
|
||||
--ngram-G ./data/lm/G_3_gram.fst.txt
|
||||
--lang-dir $lang_char_dir \
|
||||
--ngram-G ./data/lm/G_3_gram_char.fst.txt
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1234,6 +1234,7 @@ def scan_pessimistic_batches_for_oom(
|
||||
|
||||
|
||||
def main():
|
||||
raise RuntimeError("Please don't use this file directly!")
|
||||
parser = get_parser()
|
||||
AsrDataModule.add_arguments(parser)
|
||||
args = parser.parse_args()
|
@ -56,7 +56,7 @@ import torch.nn as nn
|
||||
from decoder2 import Decoder
|
||||
from onnxruntime.quantization import QuantType, quantize_dynamic
|
||||
from scaling_converter import convert_scaled_to_non_scaled
|
||||
from train2 import add_model_arguments, get_params, get_transducer_model
|
||||
from do_not_use_it_directly import add_model_arguments, get_params, get_transducer_model
|
||||
from zipformer import Zipformer
|
||||
|
||||
from icefall.checkpoint import (
|
||||
|
@ -1233,6 +1233,7 @@ def scan_pessimistic_batches_for_oom(
|
||||
|
||||
|
||||
def main():
|
||||
raise RuntimeError("Please don't use this file directly!")
|
||||
parser = get_parser()
|
||||
AishellAsrDataModule.add_arguments(parser)
|
||||
args = parser.parse_args()
|
@ -4,6 +4,6 @@ See https://k2-fsa.github.io/icefall/recipes/Streaming-ASR/librispeech/zipformer
|
||||
|
||||
[./emformer.py](./emformer.py) and [./train.py](./train.py)
|
||||
are basically the same as
|
||||
[./emformer2.py](./emformer2.py) and [./train2.py](./train2.py).
|
||||
The only purpose of [./emformer2.py](./emformer2.py) and [./train2.py](./train2.py)
|
||||
[./emformer2.py](./emformer2.py) and [./do_not_use_it_directly.py](./do_not_use_it_directly.py).
|
||||
The only purpose of [./emformer2.py](./emformer2.py) and [./do_not_use_it_directly.py](./do_not_use_it_directly.py)
|
||||
is for exporting to [sherpa-ncnn](https://github.com/k2-fsa/sherpa-ncnn).
|
||||
|
@ -1237,6 +1237,7 @@ def scan_pessimistic_batches_for_oom(
|
||||
|
||||
|
||||
def main():
|
||||
raise RuntimeError("Please don't use this file directly!")
|
||||
parser = get_parser()
|
||||
CommonVoiceAsrDataModule.add_arguments(parser)
|
||||
args = parser.parse_args()
|
@ -1274,6 +1274,7 @@ def scan_pessimistic_batches_for_oom(
|
||||
|
||||
|
||||
def main():
|
||||
raise RuntimeError("Please don't use this file directly!")
|
||||
parser = get_parser()
|
||||
CSJAsrDataModule.add_arguments(parser)
|
||||
Tokenizer.add_arguments(parser)
|
@ -72,7 +72,7 @@ from pathlib import Path
|
||||
import torch
|
||||
from scaling_converter import convert_scaled_to_non_scaled
|
||||
from tokenizer import Tokenizer
|
||||
from train2 import add_model_arguments, get_params, get_transducer_model
|
||||
from do_not_use_it_directly import add_model_arguments, get_params, get_transducer_model
|
||||
|
||||
from icefall.checkpoint import (
|
||||
average_checkpoints,
|
||||
|
@ -1099,6 +1099,7 @@ def scan_pessimistic_batches_for_oom(
|
||||
|
||||
|
||||
def main():
|
||||
raise RuntimeError("Please don't use this file directly!")
|
||||
parser = get_parser()
|
||||
LibriSpeechAsrDataModule.add_arguments(parser)
|
||||
args = parser.parse_args()
|
@ -39,8 +39,8 @@ from pathlib import Path
|
||||
|
||||
import k2
|
||||
import torch
|
||||
from do_not_use_it_directly import add_model_arguments, get_params, get_transducer_model
|
||||
from scaling_converter import convert_scaled_to_non_scaled
|
||||
from train2 import add_model_arguments, get_params, get_transducer_model
|
||||
|
||||
from icefall.checkpoint import (
|
||||
average_checkpoints,
|
||||
|
@ -61,7 +61,7 @@ import torch.nn as nn
|
||||
from decoder import Decoder
|
||||
from emformer import Emformer
|
||||
from scaling_converter import convert_scaled_to_non_scaled
|
||||
from train2 import add_model_arguments, get_params, get_transducer_model
|
||||
from do_not_use_it_directly import add_model_arguments, get_params, get_transducer_model
|
||||
|
||||
from icefall.checkpoint import (
|
||||
average_checkpoints,
|
||||
|
@ -4,7 +4,7 @@ See https://k2-fsa.github.io/icefall/recipes/Streaming-ASR/librispeech/zipformer
|
||||
|
||||
[./emformer.py](./emformer.py) and [./train.py](./train.py)
|
||||
are basically the same as
|
||||
[./emformer2.py](./emformer2.py) and [./train2.py](./train2.py).
|
||||
The only purpose of [./emformer2.py](./emformer2.py) and [./train2.py](./train2.py)
|
||||
[./emformer2.py](./emformer2.py) and [./do_not_use_it_directly.py](./do_not_use_it_directly.py).
|
||||
The only purpose of [./emformer2.py](./emformer2.py) and [./do_not_use_it_directly.py](./do_not_use_it_directly.py)
|
||||
is for exporting to [sherpa-ncnn](https://github.com/k2-fsa/sherpa-ncnn).
|
||||
|
||||
|
@ -1234,6 +1234,7 @@ def scan_pessimistic_batches_for_oom(
|
||||
|
||||
|
||||
def main():
|
||||
raise RuntimeError("Please don't use this file directly!")
|
||||
parser = get_parser()
|
||||
LibriSpeechAsrDataModule.add_arguments(parser)
|
||||
args = parser.parse_args()
|
@ -68,8 +68,8 @@ from pathlib import Path
|
||||
|
||||
import k2
|
||||
import torch
|
||||
from do_not_use_it_directly import add_model_arguments, get_params, get_transducer_model
|
||||
from scaling_converter import convert_scaled_to_non_scaled
|
||||
from train2 import add_model_arguments, get_params, get_transducer_model
|
||||
|
||||
from icefall.checkpoint import (
|
||||
average_checkpoints,
|
||||
|
@ -66,8 +66,8 @@ from pathlib import Path
|
||||
|
||||
import k2
|
||||
import torch
|
||||
from do_not_use_it_directly import add_model_arguments, get_params, get_transducer_model
|
||||
from scaling_converter import convert_scaled_to_non_scaled
|
||||
from train2 import add_model_arguments, get_params, get_transducer_model
|
||||
|
||||
from icefall.checkpoint import (
|
||||
average_checkpoints,
|
||||
|
@ -0,0 +1 @@
|
||||
../pruned_transducer_stateless7_streaming/do_not_use_it_directly.py
|
@ -66,8 +66,8 @@ from pathlib import Path
|
||||
|
||||
import k2
|
||||
import torch
|
||||
from do_not_use_it_directly import add_model_arguments, get_params, get_transducer_model
|
||||
from scaling_converter import convert_scaled_to_non_scaled
|
||||
from train2 import add_model_arguments, get_params, get_transducer_model
|
||||
|
||||
from icefall.checkpoint import (
|
||||
average_checkpoints,
|
||||
|
@ -1 +0,0 @@
|
||||
../pruned_transducer_stateless7_streaming/train2.py
|
Loading…
x
Reference in New Issue
Block a user