MCPcopy Create free account
hub / github.com/BICLab/SpikingBrain-7B / SigmoidFunction

Class SigmoidFunction

W8ASpike/activations.py:28–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27
28class SigmoidFunction(torch.autograd.Function):
29
30 @staticmethod
31 def forward(ctx, x):
32 ctx.save_for_backward(x)
33 return sigmoid_fwd(x)
34
35 @staticmethod
36 def backward(ctx, dout):
37 x, = ctx.saved_tensors
38 return sigmoid_bwd(x, dout)
39
40
41sigmoid = SigmoidFunction.apply

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected