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

Method __init__

src/diffusers/models/activations.py:103–105  ·  view source on GitHub ↗
(self, dim_in: int, dim_out: int, bias: bool = True)

Source from the content-addressed store, hash-verified

101 """
102
103 def __init__(self, dim_in: int, dim_out: int, bias: bool = True):
104 super().__init__()
105 self.proj = nn.Linear(dim_in, dim_out * 2, bias=bias)
106
107 def gelu(self, gate: torch.Tensor) -> torch.Tensor:
108 if gate.device.type == "mps" and is_torch_version("<", "2.0.0"):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected