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

Class DecoderLayer

mogen/models/transformers/finemogen.py:211–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209
210
211class DecoderLayer(nn.Module):
212
213 def __init__(self, ca_block_cfg=None, ffn_cfg=None):
214 super().__init__()
215 self.ca_block = build_attention(ca_block_cfg)
216 self.ffn = SFFN(**ffn_cfg)
217
218 def forward(self, **kwargs):
219 if self.ca_block is not None:
220 x = self.ca_block(**kwargs)
221 kwargs.update({'x': x})
222 if self.ffn is not None:
223 x = self.ffn(**kwargs)
224 return x
225
226
227@SUBMODULES.register_module()

Callers 1

build_temporal_blocksMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected