I’ll have a try, thank you. But I really think it could be good if torch.autograd.grad could incorporate a per-sample gradient computation feature, it currently have is_grads_batched, but seems not for this use case?
I’ll have a try, thank you. But I really think it could be good if torch.autograd.grad could incorporate a per-sample gradient computation feature, it currently have is_grads_batched, but seems not for this use case?