Table of Contents

Class Trainer2D

Namespace
NeuralNetworks.Trainers
Assembly
NeuralNetworks.dll
public class Trainer2D : Trainer<float[,], float[,]>
Inheritance
Trainer2D
Inherited Members

Constructors

Trainer2D(Model<float[,], float[,]>, Optimizer, SeededRandom?, ILogger<Trainer2D>?, bool)

public Trainer2D(Model<float[,], float[,]> model, Optimizer optimizer, SeededRandom? random, ILogger<Trainer2D>? logger = null, bool operationBackendTimingEnabled = false)

Parameters

model Model<float[,], float[,]>
optimizer Optimizer
random SeededRandom
logger ILogger<Trainer2D>
operationBackendTimingEnabled bool

Methods

GenerateBatches(float[,], float[,], int)

Generates batches of input and output matrices.

protected override IEnumerable<(float[,] xBatch, float[,] yBatch)> GenerateBatches(float[,] x, float[,] y, int batchSize)

Parameters

x float[,]

The input matrix.

y float[,]

The output matrix.

batchSize int

The batch size.

Returns

IEnumerable<(float[,] xBatch, float[,] yBatch)>

An enumerable of batches.

GetRows(float[,])

protected override float GetRows(float[,] x)

Parameters

x float[,]

Returns

float

PermuteData(float[,], float[,], Random)

protected override void PermuteData(float[,] x, float[,] y, Random random)

Parameters

x float[,]
y float[,]
random Random