| initialize_weights | R Documentation |
Creates a numeric vector of randomly initialized weights and bias terms for an MLP architecture.
initialize_weights(
architecture,
input_dim = NULL,
method = c("uniform", "normal"),
lower = -0.5,
upper = 0.5,
mean = 0,
sd = 0.1,
seed = NULL
)
architecture |
An object created by |
input_dim |
Optional positive integer specifying the number of input
features. If |
method |
Initialization method. Currently |
lower |
Lower bound for uniform initialization. |
upper |
Upper bound for uniform initialization. |
mean |
Mean for normal initialization. |
sd |
Standard deviation for normal initialization. |
seed |
Optional random seed. |
A numeric vector containing initialized parameters.
arch <- mlp_architecture(
input_dim = 3,
layers = list(dense_layer(2), dense_layer(1, activation = "linear"))
)
initialize_weights(arch, seed = 123)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.