In PyTorch, there exists a general autograd function:
torch.autograd.grad(input,output,...)
that doesn’t require in-place operations on tensors. Does a similar function or interface exist in libTorch? Currently, I can find most of the in-place operations but not this general one.