You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Randomly initializes parameter vector `p` with input dim `id`. Input dim does not need to be specified if these were provided to the chain object itself.
388
389
See the documentation of the individual layers to see how they are initialized, but it is generally via (Xavier) Glorot uniform or normal distributions.
389
390
"""
390
-
functioninit_params!(
391
-
chn::SimpleChain, x::AbstractVector, id =nothing; rng::AbstractRNG=local_rng()
391
+
@inlinefunctioninit_params!(
392
+
x::AbstractVector, chn::SimpleChain, id =nothing; rng::AbstractRNG=local_rng()
392
393
)
393
394
GC.@preserve x _init_params!(chn.layers, pointer(x), chain_input_dims(chn, id), rng)
394
395
return x
@@ -398,14 +399,14 @@ function _init_params!(layers::Tuple, p::Ptr, id, rng::AbstractRNG)
0 commit comments