Training

Algorithm Input

Neural network training in the batch processing mode accepts the following input. Pass the Input ID as a parameter to the methods that provide input for your algorithm. For more details, see Algorithms.

Input ID

Input

data

Pointer to the tensor of size n1 x n2 x ... x np that stores the neural network input data. This input can be an object of any class derived from Tensor.

groundTruth

Pointer to the tensor of size n1 that stores stated results associated with the input data. This input can be an object of any class derived from Tensor.

Algorithm Parameters

Neural network training in the batch processing mode has the following parameters:

Parameter

Default Value

Description

algorithmFPType

float

The floating-point type that the algorithm uses for intermediate computations. Can be float or double.

method

defaultDense

Performance-oriented computation method.

batchSize

1

The number of samples simultaneously used for training.

Note

Because the first dimension of the input data tensor represents the data samples, the library computes the number of batches by dividing n1 by the value of batchSize.

After processing each batch the library updates the parameters of the model. If n1 is not a multiple of batchSize, the algorithm ignores data samples at the end of the data tensor.

optimizationSolver

SharedPtr< optimization_solver::sgd::Batch<algorithmFPType,defaultDense> >

The optimization procedure used at the training stage.

engine

SharePtr<engines::mt19937::Batch>()

Pointer to the engine to be used by a neural network in computations. The neural network sets this engine to each layer in topology during model initialization if the layer's engine is not set yet.

Algorithm Output

Neural network training in the batch processing mode calculates the result described below. Pass the Result ID as a parameter to the methods that access the results of your algorithm. For more details, see Algorithms.

Result ID

Result

model

Trained model with the optimum set of weights and biases. The result can only be an object of the Model class.

For more complete information about compiler optimizations, see our Optimization Notice.
Select sticky button color: 
Orange (only for download buttons)