Skip to content

Commit

Permalink
softmax tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeInnes committed Aug 22, 2017
1 parent 6379100 commit 19cbce5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions test/activation.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@testset "Activation Functions" begin

xs = rand(5,5)

@test all(sum(softmax(xs), 1) .≈ 1)

@test sum(softmax(vec(xs))) 1

end
7 changes: 5 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
using NNlib
using Base.Test

# write your own tests here
@test 1 == 2
@testset "NNlib" begin

include("activation.jl")

end

0 comments on commit 19cbce5

Please sign in to comment.