File tree Expand file tree Collapse file tree
src/torchjd/autojac/_transform Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ class AccumulateGrad(Transform):
99 """
1010 Transform from Gradients to {} that accumulates gradients with respect to keys into their
1111 ``grad`` field.
12+
13+ The Gradients are not cloned and may be modified in-place by subsequent accumulations, so they
14+ should not be used elsewhere.
1215 """
1316
1417 def __call__ (self , gradients : TensorDict ) -> TensorDict :
@@ -23,6 +26,9 @@ class AccumulateJac(Transform):
2326 """
2427 Transform from Jacobians to {} that accumulates jacobians with respect to keys into their
2528 ``jac`` field.
29+
30+ The Jacobians are not cloned and may be modified in-place by subsequent accumulations, so they
31+ should not be used elsewhere.
2632 """
2733
2834 def __call__ (self , jacobians : TensorDict ) -> TensorDict :
You can’t perform that action at this time.
0 commit comments