public WeightedCombiner(NetworkMatrix weights, NetworkVector biases, TrainingMode mode) : base(mode) { if (weights == null) { throw new ArgumentException("Attempt to create a WeightedCombiner with null weights."); } if (biases == null) { throw new ArgumentException("Attempt to create a WeightedCombiner with null biases."); } if (biases.Dimension != weights.NumberOfOutputs) { throw new ArgumentException("Dimension of biases must the the same of the outputs."); } _weights = weights.Copy(); _biases = biases.Copy(); _inputs = new NetworkVector(NumberOfInputs); _outputs = new NetworkVector(NumberOfOutputs); _inputGradient = new NetworkVector(NumberOfInputs); }
public static void BackgroundLearn(NetworkMatrix net) { while (true) { net.Learn(); } }
public WeightedCombiner(WeightedCombiner combiner) { if (combiner == null) { throw new ArgumentException("Attempt to make a WeightedCombiner from null"); } this._biases = combiner._biases.Copy(); this._weights = combiner._weights.Copy(); this.Mode = combiner.Mode; }
public LayerState(NetworkMatrix weights, NetworkVector biases) { Biases = biases.ToArray(); Weights = weights.ToArray(); }
public WeightedCombiner(NetworkMatrix weights) : this(weights, new NetworkVector(weights.NumberOfOutputs)) { }
public WeightedCombiner(NetworkMatrix weights, NetworkVector biases) : this(weights, biases, TrainingMode.ONLINE) { }
public BatchWeightedCombiner(NetworkMatrix weights, NetworkVector biases) : base(weights, biases) { _biasesDelta = new NetworkVector(NumberOfOutputs); _weightsDelta = new NetworkMatrix(NumberOfOutputs, NumberOfInputs); }
public OnlineWeightedCombiner(NetworkMatrix weights, NetworkVector biases) : base(weights, biases) { }