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

Method forward

ML/src/python/neuralforge/nn/activations.py:97–98  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

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))
99
100class PReLU(nn.Module):
101 def __init__(self, num_parameters=1, init=0.25):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected