(
ctx,
x,
eps=1e-6,
)
| 173 | |
| 174 | @staticmethod |
| 175 | def forward( |
| 176 | ctx, |
| 177 | x, |
| 178 | eps=1e-6, |
| 179 | ): |
| 180 | # reshape input data into 2D tensor |
| 181 | y = _l2_norm_fwd(x, eps) |
| 182 | ctx.eps = eps |
| 183 | ctx.x_dtype = x.dtype |
| 184 | ctx.save_for_backward(x) |
| 185 | return y |
| 186 | |
| 187 | @staticmethod |
| 188 | def backward(ctx, dy, *args): |
nothing calls this directly
no test coverage detected