mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
Fix Emformer for torchscript using torch 1.6.0 (#401)
This commit is contained in:
parent
0a21eaae7f
commit
29fa878fff
@ -296,7 +296,7 @@ class Emformer(EncoderInterface):
|
|||||||
Return the initial state of each layer. NOTE: the returned
|
Return the initial state of each layer. NOTE: the returned
|
||||||
tensors are on the given device. `len(ans) == num_emformer_layers`.
|
tensors are on the given device. `len(ans) == num_emformer_layers`.
|
||||||
"""
|
"""
|
||||||
if self._init_state:
|
if len(self._init_state) > 0:
|
||||||
# Note(fangjun): It is OK to share the init state as it is
|
# Note(fangjun): It is OK to share the init state as it is
|
||||||
# not going to be modified by the model
|
# not going to be modified by the model
|
||||||
return self._init_state
|
return self._init_state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user