from local

This commit is contained in:
dohe0342 2022-12-30 13:04:42 +09:00
parent 8b6b4749f4
commit 977fb111c6
3 changed files with 2 additions and 0 deletions

View File

@ -38,10 +38,12 @@ class TransformerEncoderAdapter(TransformerEncoder):
def __init__(self, args: Wav2Vec2Config):
super().__init__(args)
self.adapters = ResidualAdapterModule()
'''
for p in self.adapters.parameters():
#p.data = nn.Parameter(torch.zeros(p.size()).to('cuda'))
p.data = nn.Parameter(torch.randn(p.size()).to('cuda'))
print(p)
'''
def forward(self, x, padding_mask=None, layer=None, tgt_layer=None):
x, layer_results = self.extract_features_with_adapter(