xlnstorch.LNSTensor.requires_grad_

xlnstorch.LNSTensor.requires_grad_#

LNSTensor.requires_grad_(requires_grad=True)#

Sets the requires_grad flag for the LNSTensor in-place.

Parameters:

requires_grad (bool, optional) – If True, the LNSTensor will track gradients. Defaults to True.

Returns:

The LNSTensor with the updated requires_grad flag.

Return type:

LNSTensor