Skip to content

Commit

Permalink
take zero-arge closure
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox committed Mar 18, 2019
1 parent c76b9c7 commit e23c8dd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions test/layers/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,18 @@ using Test, Random

@testset "Constructor" begin
mo = MaxOut(() -> identity, 4)

input = rand(40)
@test mo(input) == input
end

@testset "simple alternatives" begin
mo = MaxOut((x -> x, x -> 2x, x -> 0.5x))

input = rand(40)
@test mo(input) == 2*input
end

@testset "complex alternatives" begin
mo = MaxOut((x -> [0.5; 0.1]*x, x -> [0.2; 0.7]*x))

input = [3.0 2.0]
target = [0.5, 0.7].*input
@test mo(input) == target
Expand Down

0 comments on commit e23c8dd

Please sign in to comment.