Skip to content

Commit 72f98fc

Browse files
committed
make the words match the code
1 parent 02f6594 commit 72f98fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,9 +446,10 @@ randn32(dims...) = Base.randn(Float32, dims...)
446446
Return a bias parameter for a layer, based on the value given
447447
to the constructor's keyword `bias=bias`.
448448
449-
* `bias == true` creates a zero vector, of the same type as weights.
449+
* `bias == true` creates a trainable array of the given size, of the same type as `weights`, initialised to zero.
450450
* `bias == false` returns `false` now, which is understood by AD to be non-differentiable.
451-
* `bias::AbstractArray` uses the array provided, provided it has the correct size and eltype. If the type is wrong, it will be converted.
451+
* `bias::AbstractArray` uses the array provided, provided it has the correct size.
452+
It does not at present correct the `eltype` to match that of `weights`.
452453
"""
453454
function create_bias(weights::AbstractArray, bias::Bool, dims::Integer...)
454455
bias ? fill!(similar(weights, dims...), 0) : false

0 commit comments

Comments
 (0)