Accord.MachineLearning.BaseBatches.BaseBatches C# (CSharp) Method

BaseBatches() public method

Initializes a new instance of the BaseBatches{TBatch, TInput} class.
public BaseBatches ( Array inputs, Array weights ) : System
inputs Array The input data that should be divided into batches.
weights Array The weight for the data that should be divided into batches.
return System
        public BaseBatches(TInput[] inputs, double[] weights)
        {
            if (weights != null)
            {
                if (inputs.Length != weights.Length)
                    throw new DimensionMismatchException();
            }
            else
            {
                weights = Vector.Ones(inputs.Length);
            }

            this.Inputs = inputs;
            this.Weights = weights;
            this.MiniBatchSize = 32;
            this.Shuffle = ShuffleMethod.OnlyOnce;
            this.NumberOfMiniBatches = (int)Math.Ceiling(Inputs.Length / (double)MiniBatchSize);
        }