diff --git a/src/layers/basic.jl b/src/layers/basic.jl index c61374455a..5974c34df7 100644 --- a/src/layers/basic.jl +++ b/src/layers/basic.jl @@ -301,7 +301,7 @@ end Bilinear((in1, in2) => out, σ=identity; bias=true, init=glorot_uniform) Bilinear(W::AbstractArray, [bias, σ]) -Creates a bilinear layer, which operates on two inputs at the same time. +Creates a fully connected layer which operates on two inputs. Its output, given vectors `x` & `y`, is another vector `z` with, for all `i ∈ 1:out`: @@ -394,11 +394,7 @@ function Base.show(io::IO, l::Bilinear) print(io, "Bilinear((", size(l.weight, 2), ", ", size(l.weight, 3), ") => ", size(l.weight, 1)) end l.σ == identity || print(io, ", ", l.σ) -<<<<<<< HEAD - l.bias == Flux.Zeros() && print(io, "; bias=false") -======= - l.bias === false && print(io, ", bias=false") ->>>>>>> 1ef2cd377 (rm Flux.Zeros, take N+1) + l.bias === false && print(io, "; bias=false") print(io, ")") end diff --git a/test/utils.jl b/test/utils.jl index 9b4ceacbb1..8e763dbc1d 100644 --- a/test/utils.jl +++ b/test/utils.jl @@ -264,7 +264,7 @@ end end @testset "zero bias" begin - m = Dense(3,2; bias=false) + m = Dense(3 => 2; bias=false) @test f64(m).bias === m.bias === false @test f32(m).bias === m.bias === false @@ -376,8 +376,8 @@ end end @testset "loadparams! & absent bias" begin - m0 = Dense(2,3; bias=false, init = Flux.ones32) - m1 = Dense(2,3; bias = Flux.randn32(3)) + m0 = Dense(2 => 3; bias=false, init = Flux.ones32) + m1 = Dense(2 => 3; bias = Flux.randn32(3)) m2 = Dense(Float32[1 2; 3 4; 5 6], Float32[7, 8, 9]) Flux.loadparams!(m1, Flux.params(m2))