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);
        }
        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);
        }
        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);
        }