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

Method __init__

ML/src/python/neuralforge/nn/activations.py:92–95  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

90
91class SELU(nn.Module):
92 def __init__(self):
93 super().__init__()
94 self.alpha = 1.6732632423543772848170429916717
95 self.scale = 1.0507009873554804934193349852946
96
97 def forward(self, x):
98 return self.scale * 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