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

Method forward

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

Source from the content-addressed store, hash-verified

7 super().__init__()
8
9 def forward(self, x):
10 return 0.5 * x * (1.0 + torch.tanh(0.7978845608 * (x + 0.044715 * torch.pow(x, 3))))
11
12class Swish(nn.Module):
13 def __init__(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected