MCPcopy Create free account
hub / github.com/MotrixLab/FineMoGen / forward

Method forward

mogen/models/transformers/finemogen.py:197–208  ·  view source on GitHub ↗
(self, x, emb, **kwargs)

Source from the content-addressed store, hash-verified

195 dropout)
196
197 def forward(self, x, emb, **kwargs):
198 B, T, D = x.shape
199 x = x.reshape(B, T, 8, -1)
200 output = []
201 for i in range(8):
202 feat = x[:, :, i].contiguous()
203 feat = self.dropout(self.activation(self.linear1_list[i](feat)))
204 feat = self.linear2_list[i](feat)
205 output.append(feat)
206 y = torch.cat(output, dim=-1)
207 y = x.reshape(B, T, D) + self.proj_out(y, emb)
208 return y
209
210
211class DecoderLayer(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected