From 72f98fc26ae4f23ec67273322518329ff8d2d8af Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Sun, 20 Feb 2022 15:44:50 -0500 Subject: [PATCH] make the words match the code --- src/utils.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 5f9a4e98d7..3258a57107 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -446,9 +446,10 @@ randn32(dims...) = Base.randn(Float32, dims...) Return a bias parameter for a layer, based on the value given to the constructor's keyword `bias=bias`. -* `bias == true` creates a zero vector, of the same type as weights. +* `bias == true` creates a trainable array of the given size, of the same type as `weights`, initialised to zero. * `bias == false` returns `false` now, which is understood by AD to be non-differentiable. -* `bias::AbstractArray` uses the array provided, provided it has the correct size and eltype. If the type is wrong, it will be converted. +* `bias::AbstractArray` uses the array provided, provided it has the correct size. + It does not at present correct the `eltype` to match that of `weights`. """ function create_bias(weights::AbstractArray, bias::Bool, dims::Integer...) bias ? fill!(similar(weights, dims...), 0) : false