MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / __init__

Method __init__

verify.py:444–451  ·  view source on GitHub ↗
(self, original: nn.LayerNorm, kernel_fn: Callable)

Source from the content-addressed store, hash-verified

442 """Wraps nn.LayerNorm to use an optimized kernel_fn."""
443
444 def __init__(self, original: nn.LayerNorm, kernel_fn: Callable):
445 super().__init__()
446 self.original = original
447 self.kernel_fn = kernel_fn
448 self.weight = original.weight
449 self.bias = original.bias
450 self.eps = original.eps
451 self.normalized_shape = original.normalized_shape
452
453 def forward(self, x: torch.Tensor) -> torch.Tensor:
454 # Reshape if needed: kernel_fn expects (x, weight, bias[, eps])

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected