MCPcopy Create free account
hub / github.com/AMAP-ML/Eevee / GateModule

Class GateModule

models/dit.py:212–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210
211
212class GateModule(nn.Module):
213 def __init__(self,):
214 super().__init__()
215
216 def forward(self, x, gate, residual):
217 return x + gate * residual
218
219class DiTBlock(nn.Module):
220 def __init__(self, has_image_input: bool, dim: int, num_heads: int, ffn_dim: int, eps: float = 1e-6):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected