Skip to content

Commit 3c9cf90

Browse files
committed
fix: incorrect assert usage
1 parent ed63de4 commit 3c9cf90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/ZygoteExt/batched_autodiff.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function Lux.AutoDiffInternalImpl.batched_jacobian_impl(f::F, ::AutoZygote, x) w
33
# construct the Jacobian
44
y, pb_f = Zygote.pullback(f, x)
55

6-
@assert y isa AbstractArray MethodError
6+
@assert y isa AbstractArray "Expected output to be an AbstractArray, got $(typeof(y))"
77
if ndims(y) 1 || size(y, ndims(y)) != size(x, ndims(x))
88
throw(AssertionError("`batched_jacobian` only supports batched outputs \
99
(ndims(y) > 1) && size(y, ndims(y)) == size(x, ndims(x))."))

0 commit comments

Comments
 (0)