Skip to content

Commit 6df28a2

Browse files
committed
Clarify the use of parameter indices and self.
1 parent a8e233f commit 6df28a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/DifferentiableProgramming.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1515,10 +1515,12 @@ Linearity parameters are parameters with respect to which a function is linear.
15151515
The `@transpose` attribute accepts a `wrt:` argument which specifies a set of
15161516
linearity parameters of the original function. If `wrt:` is not specified,
15171517
linearity parameters default to all parameters. A `wrt:` argument in
1518-
`@derivative` attributes can be a parameter index or a tuple of multiple
1519-
parameter indices. All linearity parameters must have a type that conforms to
1520-
both `Differentiable` and `AdditiveArithmetic` and satisfies
1521-
`Self == Self.TangentVector`.
1518+
`@derivative` attributes can be a parameter index, a `self`, or a tuple of
1519+
parameter indices and `self`. When there are more than one linearity parameters
1520+
specified, parameter indices must be ascending, and `self` must be the first
1521+
parameter when exists. All linearity parameters must have a type that conforms
1522+
to both `Differentiable` and `AdditiveArithmetic` and satisfies `Self ==
1523+
Self.TangentVector`.
15221524

15231525
When linearity parameters do not include all of the original function's
15241526
parameters, those parameters must be taken in the front of the parameter list of

0 commit comments

Comments
 (0)