Which api in `libtorch` corresponding the `ctx.needs_input_grad` in pytorch when to define custom `torch.autograd.Function`?
When I tanslate the following python code to cpp code with libtorch
api
Which api in `libtorch` corresponding the `ctx.needs_input_grad` in pytorch when to define custom `torch.autograd.Function`?
When I tanslate the following python code to cpp code with libtorch
api