Skip to content

Commit 8b68946

Browse files
committed
fix failure as deleted
1 parent 312325a commit 8b68946

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/operation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function indexed_softmax(x::AbstractArray, xs, N; dims=1)
4343
end
4444

4545
function ∇indexed_softmax(dy::AbstractArray{T}, y::AbstractArray{S}, xs, N; dims=1) where {T,S}
46-
dx = if NNlib.within_grad()
46+
dx = if NNlib.within_gradient(y)
4747
tmp = dy .* y
4848
for i in 1:N
4949
idx = ntuple(j -> (j == dims) ? (xs .== i) : Colon(), ndims(y))

0 commit comments

Comments
 (0)