Description Usage Arguments Gates See Also Examples
Project or gate layers and neurons.
1 2 3 4 5 |
brain |
An object of class |
from, to |
Name of neurons or layers to project or gate. |
name |
If not |
gate |
The type of gate required, see gates |
type |
An object of class |
input
: If layer C is gating connections between layer A and B, all the neurons from C gate all the input connections to B.
output
: If layer C is gating connections between layer A and B, all the neurons from C gate all the output connections from A.
one2one
: If layer C is gating connections between layer A and B, each neuron from C gates one connection from A to B. This is useful for gating self-connected layers. To use this kind of gateType, A, B and C must be the same size.
network
to create a network from the connected layers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # project
brain() %>%
layer("input", 2) %>%
layer("hidden", 3) %>%
layer("output", 1) %>%
project("input", "hidden") %>%
project("hidden", "output")
# gate
brain() %>%
layer("A", 5) %>%
layer("B", 3) %>%
project("A", "B", "connection") %>%
layer("C", 4) %>%
gate(
"C",
"connection",
gate_types("input")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.