mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 10:02:22 +00:00
fix export for stateless4 (#844)
This commit is contained in:
parent
2a463a420d
commit
0af3e7beda
@ -50,6 +50,7 @@ from pathlib import Path
|
|||||||
|
|
||||||
import sentencepiece as spm
|
import sentencepiece as spm
|
||||||
import torch
|
import torch
|
||||||
|
from scaling_converter import convert_scaled_to_non_scaled
|
||||||
from train import add_model_arguments, get_params, get_transducer_model
|
from train import add_model_arguments, get_params, get_transducer_model
|
||||||
|
|
||||||
from icefall.checkpoint import (
|
from icefall.checkpoint import (
|
||||||
@ -261,6 +262,7 @@ def main():
|
|||||||
model.eval()
|
model.eval()
|
||||||
|
|
||||||
if params.jit:
|
if params.jit:
|
||||||
|
convert_scaled_to_non_scaled(model, inplace=True)
|
||||||
# We won't use the forward() method of the model in C++, so just ignore
|
# We won't use the forward() method of the model in C++, so just ignore
|
||||||
# it here.
|
# it here.
|
||||||
# Otherwise, one of its arguments is a ragged tensor and is not
|
# Otherwise, one of its arguments is a ragged tensor and is not
|
||||||
|
1
egs/librispeech/ASR/pruned_transducer_stateless4/lstmp.py
Symbolic link
1
egs/librispeech/ASR/pruned_transducer_stateless4/lstmp.py
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../pruned_transducer_stateless3/lstmp.py
|
@ -0,0 +1 @@
|
|||||||
|
../pruned_transducer_stateless3/scaling_converter.py
|
Loading…
x
Reference in New Issue
Block a user