take zero-arge closure
This commit is contained in:
parent
c76b9c7e2c
commit
e23c8ddd13
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue