示例#1
0
        public void ShouldGetWeightsForLayer(int layerNum, double[] expected)
        {
            var result = ExcelFunctions.GetWeights(Name, layerNum);

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