protected override NetworkVector _run(NetworkVector inputvalues) { if (inputvalues.Dimension != NumberOfInputs) { throw new ArgumentException("The dimension of the input does not match this WeightedCombinger."); } VectorInput = inputvalues; BatchInput = null; return(Biases.SumWith(Weights.LeftMultiply(inputvalues))); }
protected override NetworkVector _run(NetworkVector inputvalues) { if (inputvalues.Dimension != NumberOfInputs) { throw new ArgumentException("Input dimension does not match this Layer."); } VectorInput = inputvalues; BatchInput = null; List <NetworkVector> outputParts = new List <NetworkVector>(); foreach (NetworkVector inputPart in _segment(inputvalues)) { outputParts.Add(Biases.SumWith(Weights.LeftMultiply(inputPart))); } return(NetworkVector.Concatenate(outputParts)); }