public override void UpdateWeight(double newValue) { var momentum = OutNode.GetNodeValue(MomentumIndex); // and percent of last change Values[WeightIndex] += (newValue + (momentum * Values[DeltaIndex])); // Update weight with current change // Store current change for next time Values[DeltaIndex] = newValue; }
public virtual double GetWeightedValue(int index, LinkDirection direction) { var val = 0.0; switch (direction) { case LinkDirection.Input: val = Values[WeightIndex] * InNode.GetNodeValue(index); break; case LinkDirection.Output: val = Values[WeightIndex] * OutNode.GetNodeValue(index); break; } return(val); }
public virtual double GetOutValue(int index) { return(OutNode.GetNodeValue(index)); }