public void ActivationLayer_ReLu_GradientCheck() { const int fanIn = 5; const int batchSize = 10; var sut = new ActivationLayer(Activation.Relu); GradientCheckTools.CheckLayer(sut, fanIn, 1, 1, batchSize, 1e-4f, new Random(21)); }
public void BatchNormalizationLayer_GradientCheck_BatchSize_10() { const int fanIn = 5; const int batchSize = 10; var sut = new BatchNormalizationLayer(); GradientCheckTools.CheckLayer(sut, 1, 1, fanIn, batchSize, 1e-4f, new Random(21)); }
public void DenseLayer_GradientCheck_BatchSize_10() { const int fanIn = 5; const int batchSize = 10; const int neuronCount = 3; var sut = new DenseLayer(neuronCount, Activation.Undefined); GradientCheckTools.CheckLayer(sut, fanIn, 1, 1, batchSize, 1e-4f, new Random(21)); }
public void Conv2DLayer_GradientCheck_BatchSize_11() { var inputWidth = 3; var inputHeight = 3; var inputDepth = 3; var batchSize = 11; var sut = new Conv2DLayer(2, 2, 2, 1, 0, 0, Activation.Undefined); GradientCheckTools.CheckLayer(sut, inputWidth, inputHeight, inputDepth, batchSize, 1e-4f, new Random(21)); }
public void MaxPool2DLayer_GradientCheck_BatchSize_10() { const int inputWidth = 20; const int inputHeight = 20; const int inputDepth = 2; const int batchSize = 11; // Create layer const int width = 2; const int height = 2; var sut = new MaxPool2DLayer(width, height); GradientCheckTools.CheckLayer(sut, inputWidth, inputHeight, inputDepth, batchSize, 1e-4f, new Random(21)); }