connect: Project & Gate

Description Usage Arguments Gates See Also Examples

Description

Project or gate layers and neurons.

Usage

1
2
3
4
5
project(brain, from, to, name = NULL)

gate_types(gate)

gate(brain, from, to, type = NULL)

Arguments

brain

An object of class brain as returned by brain.

from, to

Name of neurons or layers to project or gate.

name

If not NULL then the projection is stored internally and can be used later on, see "gate" example.

gate

The type of gate required, see gates

type

An object of class gate as returned by gate_types or NULL.

Gates

See Also

network to create a network from the connected layers.

Examples

 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")
  )

brain-r/brain documentation built on May 21, 2019, 4:05 a.m.