MCPcopy Create free account
hub / github.com/huggingface/diffusers / LinearActivation

Class LinearActivation

src/diffusers/models/activations.py:169–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167
168
169class LinearActivation(nn.Module):
170 def __init__(self, dim_in: int, dim_out: int, bias: bool = True, activation: str = "silu"):
171 super().__init__()
172
173 self.proj = nn.Linear(dim_in, dim_out, bias=bias)
174 self.activation = get_activation(activation)
175
176 def forward(self, hidden_states):
177 hidden_states = self.proj(hidden_states)
178 return self.activation(hidden_states)

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…