File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -283,14 +283,16 @@ function _is_inferrable(f, args...; kwargs...)
283283end
284284
285285"""
286- _test_cotangent(accum_cotangent, ad_cotangent, fd_cotangent; kwargs...)
286+ _test_cotangent(accum_cotangent, ad_cotangent, fd_cotangent[, msg] ; kwargs...)
287287
288288Check if the cotangent `ad_cotangent` from `rrule` is consistent with `accum_tangent` and
289289approximately equal to the cotangent `fd_cotangent` obtained with finite differencing.
290290
291291If `accum_cotangent` is `NoTangent()`, i.e., the argument was marked as non-differentiable,
292292`ad_cotangent` and `fd_cotangent` should be `NoTangent()` as well.
293293
294+ If a msg string is given, it is emmited on test failure.
295+
294296# Keyword arguments
295297- If `check_inferred=true` (the default) and `ad_cotangent` is a thunk, then it is checked if
296298 its content can be inferred.
You can’t perform that action at this time.
0 commit comments