-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathneuronLayer.js
More file actions
43 lines (34 loc) · 743 Bytes
/
Copy pathneuronLayer.js
File metadata and controls
43 lines (34 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* Neuron layer
* A set of neuron which take an input array (prvious array) and give an output.
*/
var NeuronLayer = function()
{
/** Initializer **/
/**
* Initialize a layer from an array of neurons
*/
this.init_layer = function(neuronsList)
{
neurons = neuronsList;
}
/** Attributes **/
/**
* Set of neurons
*/
var neurons;
/** Methods **/
/**
* Return the output of that layer by calling the get output of its neurons
*/
this.get_output = function(input)
{
//List of output of that layer (output of each neuron in taht layer)
var output = new Array(neurons.length);
for(var i=0; i < neurons.length; i++)
{
output[i] = neurons[i].get_output(input);
}
return output;
}
}