mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-10 10:32:17 +00:00
* support transformer LM * show number of parameters during training * update docstring * testing files for ppl calculation * add lm wrampper for rnn and transformer LM * apply lm wrapper in lm shallow fusion * small updates * update decode.py to support LM fusion and LODR * add export.py * update CI and workflow * update decoding results * fix CI * remove transformer LM from CI test
73 lines
1.2 KiB
Python
73 lines
1.2 KiB
Python
# isort:skip_file
|
|
|
|
from . import (
|
|
checkpoint,
|
|
decode,
|
|
dist,
|
|
env,
|
|
utils
|
|
)
|
|
|
|
from .checkpoint import (
|
|
average_checkpoints,
|
|
find_checkpoints,
|
|
load_checkpoint,
|
|
remove_checkpoints,
|
|
save_checkpoint,
|
|
save_checkpoint_with_global_batch_idx,
|
|
)
|
|
|
|
from .decode import (
|
|
get_lattice,
|
|
nbest_decoding,
|
|
nbest_oracle,
|
|
one_best_decoding,
|
|
rescore_with_attention_decoder,
|
|
rescore_with_n_best_list,
|
|
rescore_with_whole_lattice,
|
|
)
|
|
|
|
from .dist import (
|
|
cleanup_dist,
|
|
setup_dist,
|
|
)
|
|
|
|
from .env import (
|
|
get_env_info,
|
|
get_git_branch_name,
|
|
get_git_date,
|
|
get_git_sha1,
|
|
)
|
|
|
|
from .utils import (
|
|
AttributeDict,
|
|
MetricsTracker,
|
|
add_eos,
|
|
add_sos,
|
|
concat,
|
|
encode_supervisions,
|
|
get_alignments,
|
|
get_executor,
|
|
get_texts,
|
|
is_jit_tracing,
|
|
is_module_available,
|
|
l1_norm,
|
|
l2_norm,
|
|
linf_norm,
|
|
load_alignments,
|
|
make_pad_mask,
|
|
measure_gradient_norms,
|
|
measure_weight_norms,
|
|
optim_step_and_measure_param_change,
|
|
save_alignments,
|
|
setup_logger,
|
|
store_transcripts,
|
|
str2bool,
|
|
subsequent_chunk_mask,
|
|
write_error_stats,
|
|
)
|
|
|
|
from .ngram_lm import NgramLm, NgramLmStateCost
|
|
|
|
from .lm_wrapper import LmScorer
|