xlnstorch.LNSTensor.grad_fn

xlnstorch.LNSTensor.grad_fn#

property LNSTensor.grad_fn: torch._C.Function | None#

Returns the function that created this LNSTensor, if it was created by an operation that has a gradient function.

Returns:

The gradient function that created this LNSTensor, or None if it was created by a non-differentiable operation.

Return type:

torch._C.Function or None