Skip to content

Commit d219cdb

Browse files
committed
correct logsoftmax grad test
1 parent 0773796 commit d219cdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/activation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ end
100100
xs = Float32[1 2 3; 1000 2000 3000]
101101
@test logsoftmax(xs) [-999 -1998 -2997; 0 0 0.]
102102

103-
@test NNlib.∇logsoftmax(ones(size(xs)), xs) zeros(Float32, size(xs))
103+
@test NNlib.∇logsoftmax(ones(size(xs)), xs) Float32[1 1 1; -1 -1 -1]
104104
@test NNlib.∇softmax(ones(size(xs)), xs) zeros(Float32, size(xs))
105105

106106
# These values precalculated using PyTorch's nn.LogSoftmax

0 commit comments

Comments
 (0)