Description Usage Arguments Value Examples
These functions construct new network by merging two networks (they must have the same number of layers) or by connecting one network outputs to another network inputs (the numbers of output and input neurons must agree). These functions may be used in constructing deep learning networks or constructing networks with some special topologies.
1 2 3 |
net1 |
an object of |
net2 |
an object of |
same_inputs |
logical, if TRUE both merged networks are assumed to take the same inputs (they share the input layer), default is FALSE |
Both functions return an object of mlp_net
class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # create two 2-2-2 networks with random weights and plot them
net1 <- mlp_net(c(2, 2, 2))
net1 <- mlp_rnd_weights(net1)
mlp_plot(net1, TRUE)
net2 <- mlp_net(c(2, 2, 2))
net2 <- mlp_rnd_weights(net2)
mlp_plot(net2, TRUE)
# create a 4-3-2 network with random weights and plot it
net3 <- mlp_net(c(4, 3, 2))
net3 <- mlp_rnd_weights(net3)
mlp_plot(net3, TRUE)
# construct new network using net1, net2, and net3 and plot it
net4 <- mlp_stack(mlp_merge(net1, net2), net3)
mlp_plot(net4, TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.