Description Usage Arguments Details Examples
View source: R/build_pytorch_net.R
Utility function to build an MLP with a choice of activation function and weight initialization with optional dropout and batch normalization.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
n_in |
|
n_out |
|
nodes |
|
activation |
|
act_pars |
|
dropout |
|
bias |
|
batch_norm |
|
batch_pars |
|
init |
|
init_pars |
|
This function is a helper for R users with less Python experience. Currently it is limited to simple MLPs. More advanced networks will require manual creation with reticulate.
1 2 3 4 5 | build_pytorch_net(10, 1)
build_pytorch_net(n_in = 10, n_out = 1, nodes = c(4, 4, 4), activation = "elu",
act_pars = list(alpha = 0.5), dropout = c(0.2, 0.1, 0.6),
batch_norm = TRUE, init = "kaiming_normal", init_pars = list(non_linearity = "relu"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.