public void GradientWrtParametersCheck(int inputWidth, int inputHeight, int inputDepth, int neuronCount)
        {
            // Create layer
            var layer = new FullyConnLayer(neuronCount);

            GradientCheckTools.GradienWrtParameterstCheck(inputWidth, inputHeight, inputDepth, layer);
        }
Example #2
0
        public void GradientWrtInputCheck()
        {
            const int inputWidth  = 20;
            const int inputHeight = 20;
            const int inputDepth  = 2;

            // Create layer
            var layer = new TanhLayer();

            GradientCheckTools.GradientCheck(layer, inputWidth, inputHeight, inputDepth);
        }
Example #3
0
        public void GradientWrtInputCheck()
        {
            const int inputWidth  = 20;
            const int inputHeight = 20;
            const int inputDepth  = 2;

            // Create layer
            const int width  = 2;
            const int height = 2;
            var       layer  = new PoolLayer(width, height)
            {
                Stride = 2
            };

            GradientCheckTools.GradientCheck(layer, inputWidth, inputHeight, inputDepth, 1e-6);
        }
Example #4
0
        public void GradientWrtParametersCheck()
        {
            const int inputWidth  = 10;
            const int inputHeight = 10;
            const int inputDepth  = 2;

            // Create layer
            const int filterWidth  = 3;
            const int filterHeight = 3;
            const int filterCount  = 2;

            var layer = new ConvLayer(filterWidth, filterHeight, filterCount)
            {
                Stride = 2
            };

            GradientCheckTools.GradienWrtParameterstCheck(inputWidth, inputHeight, inputDepth, layer);
        }
Example #5
0
        public void GradientWrtInputCheck()
        {
            const int inputWidth  = 30;
            const int inputHeight = 30;
            const int inputDepth  = 2;

            // Create layer
            const int filterWidth  = 3;
            const int filterHeight = 3;
            const int filterCount  = 5;

            var layer = new ConvLayer(filterWidth, filterHeight, filterCount)
            {
                Stride = 2
            };

            GradientCheckTools.GradientCheck(layer, inputWidth, inputHeight, inputDepth);
        }