(ctx, foo)
| 135 | class Fn(torch.autograd.Function): |
| 136 | @staticmethod |
| 137 | def forward(ctx, foo): |
| 138 | result = torch.exp(foo) |
| 139 | # Tensors stored in ``ctx`` can be used in the subsequent forward grad |
| 140 | # computation. |
| 141 | ctx.result = result |
| 142 | return result |
| 143 | |
| 144 | @staticmethod |
| 145 | def jvp(ctx, gI): |