Skip to content

Commit

Permalink
Merge pull request #350 from FluxML/patch
Browse files Browse the repository at this point in the history
Fix failure as  deleted
  • Loading branch information
yuehhua authored Jan 8, 2023
2 parents 312325a + 8b68946 commit 63265df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function indexed_softmax(x::AbstractArray, xs, N; dims=1)
end

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

0 comments on commit 63265df

Please sign in to comment.