from local

This commit is contained in:
dohe0342 2022-12-26 15:37:35 +09:00
parent 6eb330916a
commit b113b1614f
3 changed files with 2 additions and 0 deletions

Binary file not shown.

View File

@ -39,6 +39,8 @@ class TransformerEncoderAdapter(TransformerEncoder):
def __init__(self, args: Wav2Vec2Config):
super().__init__(args)
self.adapters = ResidualAdapterModule()
for p in self.adapters.parameters():
p.data = torch.nn.parameters(0.)
def forward(self, x, padding_mask=None, layer=None, tgt_layer=None):
x, layer_results = self.extract_features_with_adapter(