@@ -24,7 +24,7 @@ initial_params(c::FastChain) = vcat(initial_params.(c.layers)...)
24
24
25
25
"""
26
26
FastDense(in,out,activation=identity;
27
- bias = true ,initW = Flux.glorot_uniform, initb = Flux.zeros )
27
+ bias = true ,initW = Flux.glorot_uniform, initb = Flux.zeros32 )
28
28
29
29
A Dense layer `activation.(W*x + b)` with input size `in` and output size `out`.
30
30
The `activation` function defaults to `identity`, meaning the layer is an affine
@@ -41,7 +41,7 @@ struct FastDense{F,F2} <: FastLayer
41
41
initial_params:: F2
42
42
bias:: Bool
43
43
function FastDense (in:: Integer , out:: Integer , σ = identity;
44
- bias = true , initW = Flux. glorot_uniform, initb = Flux. zeros )
44
+ bias = true , initW = Flux. glorot_uniform, initb = Flux. zeros32 )
45
45
temp = ((bias == false ) ? vcat (vec (initW (out, in))) : vcat (vec (initW (out, in)),initb (out)))
46
46
initial_params () = temp
47
47
new {typeof(σ),typeof(initial_params)} (out,in,σ,initial_params,bias)
@@ -108,7 +108,7 @@ initial_params(f::FastDense) = f.initial_params()
108
108
109
109
"""
110
110
StaticDense(in,out,activation=identity;
111
- initW = Flux.glorot_uniform, initb = Flux.zeros )
111
+ initW = Flux.glorot_uniform, initb = Flux.zeros32 )
112
112
113
113
A Dense layer `activation.(W*x + b)` with input size `in` and output size `out`.
114
114
The `activation` function defaults to `identity`, meaning the layer is an affine
@@ -124,7 +124,7 @@ struct StaticDense{out,in,bias,F,F2} <: FastLayer
124
124
σ:: F
125
125
initial_params:: F2
126
126
function StaticDense (in:: Integer , out:: Integer , σ = identity;
127
- bias:: Bool = true , initW = Flux. glorot_uniform, initb = Flux. zeros )
127
+ bias:: Bool = true , initW = Flux. glorot_uniform, initb = Flux. zeros32 )
128
128
temp = ((bias == true ) ? vcat (vec (initW (out, in)),initb (out)) : vcat (vec (initW (out, in))) )
129
129
initial_params () = temp
130
130
new {out,in,bias,typeof(σ),typeof(initial_params)} (σ,initial_params)
0 commit comments