mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-12-11 06:55:27 +00:00
from local
This commit is contained in:
parent
52edf53b59
commit
eefb5708ec
Binary file not shown.
Binary file not shown.
@ -39,15 +39,6 @@ class TransformerEncoderAdapter(TransformerEncoder):
|
|||||||
super().__init__(args)
|
super().__init__(args)
|
||||||
self.adapters = ResidualAdapterModule()
|
self.adapters = ResidualAdapterModule()
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def add_adapter_arguments(cls, parser: argparse.ArgumentParser):
|
|
||||||
parser.add_argument(
|
|
||||||
"--add-adapter",
|
|
||||||
type=str2bool,
|
|
||||||
default=False,
|
|
||||||
help="add adapter to rep model's encoder"
|
|
||||||
)
|
|
||||||
|
|
||||||
def forward(self, x, padding_mask=None, layer=None, tgt_layer=None):
|
def forward(self, x, padding_mask=None, layer=None, tgt_layer=None):
|
||||||
x, layer_results = self.extract_features_with_adapter(
|
x, layer_results = self.extract_features_with_adapter(
|
||||||
x,
|
x,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user