Search Framework:
BatchedInputsOutputs
Namespace: WealthLab.DeepLearning
Parent: Object

This Deep Learning utility class accepts Model training Inputs and Outputs and returns batches of data according to the specified batch size. The batching operation occurs in the class constructors.

Constructors
BatchedInputsOutputs
public BatchedInputsOutputs(List<List<double>> inputs, List<List<double>> outputs, int batchSize, bool enforceSameDimentions = false)
public BatchedInputsOutputs(List<List<double>> inputs, int seqLength)

The first constructor accepts Model inputs and outputs and a desired batchSize. The resulting data batches are accessible via the GetInputBatch and GetOutputBatch methods. If enforceSameDimensions is true, the final batch will not be included if it has fewer than batchSize data points.

The second constructor produces batches for inputs only, with a batch size specified in the seqLength parameter. This version is used in the TorchSharp LSTM Learning Engine.



Members
Count
public int Count

Returns the number of data batches generated.


GetInputBatch
public List<List<double>> GetInputBatch(int n)

Returns the input batch number n.


GetOutputBatch
public List<List<double>> GetOutputBatch(int n)

Returns the output batch number n.