from local
This commit is contained in:
parent
17a39eb885
commit
c19081f271
BIN
egs/tedlium2/ASR/conformer_ctc3/.transformer.py.swp
Normal file
BIN
egs/tedlium2/ASR/conformer_ctc3/.transformer.py.swp
Normal file
Binary file not shown.
@ -186,9 +186,11 @@ class Transformer(nn.Module):
|
|||||||
encoder_memory, memory_key_padding_mask = self.run_encoder(
|
encoder_memory, memory_key_padding_mask = self.run_encoder(
|
||||||
x, supervision, warmup
|
x, supervision, warmup
|
||||||
)
|
)
|
||||||
|
if type(encoder_memory) == tuple:
|
||||||
|
(encoder_memory, layer_outputs) = encoder_memory
|
||||||
|
|
||||||
x = self.ctc_output(encoder_memory)
|
x = self.ctc_output(encoder_memory)
|
||||||
return x, encoder_memory, memory_key_padding_mask
|
return (x, layer_outputs), encoder_memory, memory_key_padding_mask
|
||||||
|
|
||||||
def run_encoder(
|
def run_encoder(
|
||||||
self,
|
self,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user