Methods
# addLayer(layer)
Add a layer to the neural network.
Parameters:
Name | Type | Description |
---|---|---|
layer |
Layer
|
The layer to add. |
# feedforward(input) → {Array}
Feedforward the input through the network.
Parameters:
Name | Type | Description |
---|---|---|
input |
Array
|
The input values. |
The output of the network.
Array
# initialize()
Initialize the neural network with random weights.
# removeLayer(layer)
Remove a layer from the neural network.
Parameters:
Name | Type | Description |
---|---|---|
layer |
Layer
|
The layer to remove. |
# setInputLayer(layer)
Set a layer as the input layer of the neural network.
Parameters:
Name | Type | Description |
---|---|---|
layer |
Layer
|
The layer to set as input layer. |
# setOutputLayer(layer)
Set a layer as the output layer of the neural network.
Parameters:
Name | Type | Description |
---|---|---|
layer |
Layer
|
The layer to set as output layer. |
# train(data)
Train the neural network with given data.
Parameters:
Name | Type | Description |
---|---|---|
data |
Array
|
The training data. |