// Prediction layer // public void AddPredictionLayer(FNodeSet Fields, ScalarFunction Activator, NodeReduction Reducer) { this._PredictionActivation = Activator; this._YValues = Fields; this._PredictionReducer = Reducer; }
// Hidden layer // public void AddHiddenLayer(bool Bias, int DynamicCount, ScalarFunction Activator, NodeReduction Reducer) { this._HiddenLayers.Add(new NN_Layer(Bias, Reducer, Activator, DynamicCount, this._HiddenLayers.Count + 1)); }
public void AddHiddenLayer(bool Bias, int DynamicCount, ScalarFunction Activator) { this.AddHiddenLayer(Bias, DynamicCount, Activator, this.DefaultReduction); }
public NN_Layer(bool Bias, NodeReduction Connector, ScalarFunction Activator, int TotalCount, int Level) : this() { // Check if rendered // if (this._IsRendered) throw new Exception("Layer already rendered"); // Check the total count // if (TotalCount < 1) throw new Exception("Cannot have fewer than one node"); // Add the bias node // if (Bias) this._Nodes.Add(new NeuralNodeStatic(string.Format("H{0}_0", Level), 1)); // Add the references // for (int i = 0; i < TotalCount; i++) this._Nodes.Add(new NeuralNodeDynamic(string.Format("H{0}_{1}", Level, i + 1), Activator, Connector)); // Tag as rendered // this._IsRendered = true; }
public NN_Layer(NodeReduction Connector, ScalarFunction Activator, Key Fields) : this() { // Check if rendered // if (this._IsRendered) throw new Exception("Layer already rendered"); // Add the references // for (int i = 0; i < Fields.Count; i++) this._Nodes.Add(new NeuralNodePrediction("Y" + i.ToString(), Activator, Connector, Fields[i])); // Tag as rendered // this._IsRendered = true; }
public void AddPredictionLayer(FNodeSet Fields, ScalarFunction Activator) { this.AddPredictionLayer(Fields, Activator, this.DefaultReduction); }
public void AddOutputLayer(int[] Offsets, ScalarFunction Activator) { if (this._phase != 0) throw new InvalidOperationException("Cannot alter the state of the network after it has been constructed"); this._terminis = new OutputLinearLayer(Offsets, Activator); }
public void AddHiddenLayer(int Size, bool Bias, ScalarFunction Activator) { if (this._phase != 0) throw new InvalidOperationException("Cannot alter the state of the network after it has been constructed"); DynamicLinearLayer layer = new DynamicLinearLayer(Size, Bias, Activator); this._layer_tree.Add(layer); }
public OutputLinearLayer(int[] Offsets, ScalarFunction Activation) : base(Offsets.Length, false) { this.OFFSETS = Offsets; this.ACT = Activation; this.Affinity = NeuralLayerAffinity.Output; }
public DynamicLinearLayer(int Size, bool Bias, ScalarFunction Activation) : base(Size + (Bias ? 1 : 0), Bias) { this.ACT = Activation; this.Affinity = NeuralLayerAffinity.Dynamic; }