MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / T5LayerFF

Class T5LayerFF

examples/diffusion/python_stable_diffusion_3/other_impls.py:357–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355
356
357class T5LayerFF(torch.nn.Module):
358 def __init__(self, model_dim, ff_dim, dtype, device):
359 super().__init__()
360 self.DenseReluDense = T5DenseGatedActDense(model_dim, ff_dim, dtype, device)
361 self.layer_norm = T5LayerNorm(model_dim, dtype=dtype, device=device)
362
363 def forward(self, x):
364 forwarded_states = self.layer_norm(x)
365 forwarded_states = self.DenseReluDense(forwarded_states)
366 x += forwarded_states
367 return x
368
369
370class T5Attention(torch.nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected