public void ShouldGetWeightsForLayer(int layerNum, double[] expected) { var result = ExcelFunctions.GetWeights(Name, layerNum); result.Should().BeAssignableTo <double[, ]>(); Assert.Equal(expected.ToVertical2DArray(), result); }
public void IfLayerHigherThanNumLayers_Throw() { Assert.Throws <NNXException>(() => ExcelFunctions.GetWeights(Name, 3)); }
public void IfLayerNumNotPositive_Throw(int badLayer) { Assert.Throws <NNXException>(() => ExcelFunctions.GetWeights(Name, badLayer)); }
public void IfObjectIsNotNeuralNet_Throw() { ObjectStore.Add("x", "y"); Assert.Throws <NNXException>(() => ExcelFunctions.GetWeights("x", 2)); }
public void IfNeuralNetDoesNotExist_Throw() { Assert.Throws <NNXException>(() => ExcelFunctions.GetWeights("nosuch", 2)); }