File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -446,9 +446,10 @@ randn32(dims...) = Base.randn(Float32, dims...)
446
446
Return a bias parameter for a layer, based on the value given
447
447
to the constructor's keyword `bias=bias`.
448
448
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 .
450
450
* `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`.
452
453
"""
453
454
function create_bias (weights:: AbstractArray , bias:: Bool , dims:: Integer... )
454
455
bias ? fill! (similar (weights, dims... ), 0 ) : false
You can’t perform that action at this time.
0 commit comments