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

Method forward

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

Source from the content-addressed store, hash-verified

103 self.weight = nn.Parameter(torch.ones(num_parameters) * init)
104
105 def forward(self, x):
106 return torch.where(x > 0, x, self.weight * x)
107
108class LeakyReLU(nn.Module):
109 def __init__(self, negative_slope=0.01):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected