nn_mlp | R Documentation |
A shortcut to create a feed-forward block (MLP block)
nn_mlp(..., activation = nnf_relu)
... |
( |
activation |
Used if only integers are specified. By default: |
nn_mlp(10, 1) nn_mlp(30, 10, 1) # Simple forward pass net <- nn_mlp(4, 2, 1) x <- as_torch_tensor(iris[, 1:4]) net(x) # Simple forward pass with identity function net <- nn_mlp(4, 2, 1, activation = function (x) x) x <- as_torch_tensor(iris[, 1:4]) net(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.