We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99b4260 commit 712667cCopy full SHA for 712667c
src/torchjd/utils/_jac_to_grad.py
@@ -66,10 +66,10 @@ def _disunite_gradient(
66
67
def _free_jacs(params: Iterable[Tensor]) -> None:
68
"""
69
- Clears the ``.jac`` fields of the provided parameters by setting them to ``None``.
+ Deletes the ``.jac`` field of the provided parameters.
70
71
:param params: The parameters whose ``.jac`` fields should be cleared.
72
73
74
for p in params:
75
- p.jac = None
+ del p.jac
0 commit comments