out =d_ out.sum().requires_grad_()

if there is no such this operation,the following error will occur:
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
I don’t konw how to solve the problem.