| 26 | |
| 27 | |
| 28 | class 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 | |
| 41 | sigmoid = SigmoidFunction.apply |
nothing calls this directly
no outgoing calls
no test coverage detected