Skip to content

Commit

Permalink
fix for test
Browse files Browse the repository at this point in the history
  • Loading branch information
YosukeHiguchi committed May 18, 2022
1 parent 9c83ddb commit 4de7aa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions espnet/nets/pytorch_backend/e2e_asr_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __init__(self, idim, odim, args, ignore_id=-1):
self.ctc = None

self.intermediate_ctc_weight = args.intermediate_ctc_weight
self.intermediate_ctc_layers = []
self.intermediate_ctc_layers = None
if args.intermediate_ctc_layer != "":
self.intermediate_ctc_layers = [
int(i) for i in args.intermediate_ctc_layer.split(",")
Expand Down Expand Up @@ -295,7 +295,7 @@ def encode(self, x):
"""
self.eval()
x = torch.as_tensor(x).unsqueeze(0)
enc_output, _, _ = self.encoder(x, None)
enc_output, *_ = self.encoder(x, None)
return enc_output.squeeze(0)

def recognize(self, x, recog_args, char_list=None, rnnlm=None, use_jit=False):
Expand Down

0 comments on commit 4de7aa5

Please sign in to comment.