MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

ML/src/python/neuralforge/nn/activations.py:84–86  ·  view source on GitHub ↗
(self, alpha=1.0)

Source from the content-addressed store, hash-verified

82
83class ELU(nn.Module):
84 def __init__(self, alpha=1.0):
85 super().__init__()
86 self.alpha = alpha
87
88 def forward(self, x):
89 return torch.where(x > 0, x, self.alpha * (torch.exp(x) - 1))

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected