from local

This commit is contained in:
dohe0342 2022-12-26 15:38:01 +09:00
parent b113b1614f
commit 29a3f882f0
2 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class TransformerEncoderAdapter(TransformerEncoder):
super().__init__(args)
self.adapters = ResidualAdapterModule()
for p in self.adapters.parameters():
p.data = torch.nn.parameters(0.)
p.data = torch.nn.parameters(torch.zeros(p.size()).to('cuda'))
def forward(self, x, padding_mask=None, layer=None, tgt_layer=None):
x, layer_results = self.extract_features_with_adapter(