public virtual double CalculateActivation(double weightedInputs) { double result = Y_STRETCH * Math.Tanh(X_STRETCH * weightedInputs); if (double.IsNaN(result)) throw new Exception("NaN!"); return result; }
protected void FinaliseOutputs(Step downstream) { for (int i = 0; i < downstream.WeightedInputs.Length; i++) { downstream.Output[i] = downstream.CalculateActivation(downstream.WeightedInputs[i]); } }