You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
class Neuron
|
|
{
|
|
constructor(numInputs)
|
|
{
|
|
this.weights = [];
|
|
this.numInputs = numInputs;
|
|
|
|
for (var i=0; i<numInputs+1; ++i)
|
|
{
|
|
var newWeight = -1 + (Math.random()*2);
|
|
//var newWeight = 1;
|
|
this.weights.push(newWeight);
|
|
}
|
|
}
|
|
}
|