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
cb45c76e47
commit
b21111b67f
Binary file not shown.
Binary file not shown.
@ -40,7 +40,6 @@ class TransformerEncoderAdapter(TransformerEncoder):
|
||||
def __init__(self, args: Wav2Vec2Config):
|
||||
super().__init__(args)
|
||||
self.adapters = ResidualAdapterModule()
|
||||
#self.adapters = ConvolutionModule(768, 31)
|
||||
|
||||
for p in self.adapters.parameters():
|
||||
#p.data = nn.Parameter(torch.zeros(p.size()).to('cuda'))
|
||||
@ -146,7 +145,8 @@ class ResidualAdapterModule(nn.Module):
|
||||
|
||||
super().__init__()
|
||||
|
||||
def build_adapter(embedding_dim, proj_dim):
|
||||
self.adapters = ConvolutionModule(768, 31)
|
||||
def build_adapter(embedding_dim, proj_dim, type_='conv'):
|
||||
return nn.Sequential(
|
||||
#nn.LayerNorm(embedding_dim),
|
||||
nn.Linear(embedding_dim, proj_dim),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user