ps://github.com/pytorch/pytorch/pull/60521#issuecomment-867061780
     for more details.
Parameters:
      * tensors (Sequence[Tensor] or Tensor) -- Tensors
        of which the derivative will be computed.
  * **grad_tensors** (*Sequence**[**Tensor** or **None**] or
    **Tensor**, **optional*) -- The "vector" in the Jacobian-
    vector product, usually gradients w.r.t. each element of
    corresponding tensors. None values can be specified for scalar
    Tensors or ones that don't require grad. If a None value would
    be acceptable for all grad_tensors, then this argument is
    optional.

  * **retain_graph** (*bool**, **optional*) -- If "False", the
    graph used to compute the grad will be freed. Note that in
    nearly all cases setting this option to "True" is not needed
    and often can be worked around in a much more efficient way.
    Defaults to the value of "create_graph".
