graphlow.TensorMesh.requires_grad#

TensorMesh.requires_grad(requires_grad: bool = True, point_data: bool = False, cell_data: bool = False) None#

Set requires_grad flags for backend tensors.

Parameters:
requires_gradbool

If True, gradients are tracked. If False, gradients are not tracked.

point_databool, default=False

If True, also applies to floating-point arrays in point_data. (in addition to points).

cell_databool, default=False

If True, also applies to floating-point arrays in cell_data. (in addition to points).