| 286 | |
| 287 | |
| 288 | class SquaredReLUFunction(torch.autograd.Function): |
| 289 | |
| 290 | @staticmethod |
| 291 | def forward(ctx, input): |
| 292 | ctx.save_for_backward(input) |
| 293 | return sqrelu_fwd(input) |
| 294 | |
| 295 | @staticmethod |
| 296 | def backward(ctx, grad_output): |
| 297 | input, = ctx.saved_tensors |
| 298 | return sqrelu_bwd(grad_output, input) |
| 299 | |
| 300 | |
| 301 | sqrelu = SquaredReLUFunction.apply |
nothing calls this directly
no outgoing calls
no test coverage detected