We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed63de4 commit 3c9cf90Copy full SHA for 3c9cf90
ext/ZygoteExt/batched_autodiff.jl
@@ -3,7 +3,7 @@ function Lux.AutoDiffInternalImpl.batched_jacobian_impl(f::F, ::AutoZygote, x) w
3
# construct the Jacobian
4
y, pb_f = Zygote.pullback(f, x)
5
6
- @assert y isa AbstractArray MethodError
+ @assert y isa AbstractArray "Expected output to be an AbstractArray, got $(typeof(y))"
7
if ndims(y) ≤ 1 || size(y, ndims(y)) != size(x, ndims(x))
8
throw(AssertionError("`batched_jacobian` only supports batched outputs \
9
(ndims(y) > 1) && size(y, ndims(y)) == size(x, ndims(x))."))
0 commit comments