MCPcopy Create free account
hub / github.com/FireRedTeam/FireRedASR / __init__

Method __init__

fireredasr/models/module/adapter.py:6–11  ·  view source on GitHub ↗
(self, encoder_dim, llm_dim, downsample_rate=2)

Source from the content-addressed store, hash-verified

4
5class Adapter(nn.Module):
6 def __init__(self, encoder_dim, llm_dim, downsample_rate=2):
7 super().__init__()
8 self.ds = downsample_rate
9 self.linear1 = nn.Linear(encoder_dim * downsample_rate, llm_dim)
10 self.relu = nn.ReLU()
11 self.linear2 = nn.Linear(llm_dim, llm_dim)
12
13 def forward(self, x, x_lens):
14 batch_size, seq_len, feat_dim = x.size()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected