Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and tjysdsg committed Apr 6, 2023
1 parent c0bf024 commit a55e469
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions espnet2/asr/encoder/e_branchformer_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""

import logging
from typing import List, Optional, Tuple
from typing import Optional, Tuple

import torch
from typeguard import check_argument_types
Expand Down Expand Up @@ -447,7 +447,6 @@ def forward(
xs_pad, masks = encoder_layer(xs_pad, masks)

if layer_idx + 1 in self.interctc_layer_idx:

encoder_out = xs_pad

if isinstance(encoder_out, tuple):
Expand Down
4 changes: 2 additions & 2 deletions espnet2/bin/asr_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from distutils.version import LooseVersion
from itertools import groupby
from pathlib import Path
from typing import Any, List, Optional, Sequence, Tuple, Union, Dict
from typing import Any, Dict, List, Optional, Sequence, Tuple, Union

import numpy as np
import torch
Expand Down Expand Up @@ -33,12 +33,12 @@
from espnet.nets.batch_beam_search_online_sim import BatchBeamSearchOnlineSim
from espnet.nets.beam_search import BeamSearch, Hypothesis
from espnet.nets.beam_search_timesync import BeamSearchTimeSync
from espnet.nets.pytorch_backend.transformer.add_sos_eos import add_sos_eos
from espnet.nets.pytorch_backend.transformer.subsampling import TooShortUttError
from espnet.nets.scorer_interface import BatchScorerInterface
from espnet.nets.scorers.ctc import CTCPrefixScorer
from espnet.nets.scorers.length_bonus import LengthBonus
from espnet.utils.cli_utils import get_commandline_args
from espnet.nets.pytorch_backend.transformer.add_sos_eos import add_sos_eos

try:
from transformers import AutoModelForSeq2SeqLM
Expand Down
2 changes: 1 addition & 1 deletion test/espnet2/asr/encoder/test_e_branchformer_encoder.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pytest
import torch

from espnet2.asr.encoder.e_branchformer_encoder import EBranchformerEncoder
from espnet2.asr.ctc import CTC
from espnet2.asr.encoder.e_branchformer_encoder import EBranchformerEncoder


@pytest.mark.parametrize(
Expand Down

0 comments on commit a55e469

Please sign in to comment.