MCPcopy Index your code
hub / github.com/huggingface/diffusers / __init__

Method __init__

src/diffusers/models/normalization.py:621–626  ·  view source on GitHub ↗
(self, p: int = 2, dim: int = -1, eps: float = 1e-12)

Source from the content-addressed store, hash-verified

619
620class LpNorm(nn.Module):
621 def __init__(self, p: int = 2, dim: int = -1, eps: float = 1e-12):
622 super().__init__()
623
624 self.p = p
625 self.dim = dim
626 self.eps = eps
627
628 def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
629 return F.normalize(hidden_states, p=self.p, dim=self.dim, eps=self.eps)

Callers 15

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected