コード例 #1
0
ファイル: Tensor.cs プロジェクト: kapkapas/Neuro
        public static void Conv2DInputsGradient(Tensor gradient, Tensor kernels, int stride, Tensor inputsGradient)
        {
            inputsGradient.Zero();
            Tensor rotKernels = kernels.Rotated180();

            int outputWidth = 0, outputHeight = 0, paddingX = 0, paddingY = 0;

            GetPaddingParams(PaddingType.Full, gradient.Width, gradient.Height, kernels.Width, kernels.Height, stride, out outputHeight, out outputWidth, out paddingX, out paddingY);
            Op.Conv2DInputGradient(gradient, rotKernels, stride, paddingX, paddingY, inputsGradient);
        }
コード例 #2
0
 public static void Conv2DInputsGradient(Tensor gradient, Tensor kernels, int stride, PaddingType padding, Tensor inputsGradient)
 {
     inputsGradient.Zero();
     Op.Conv2DInputGradient(gradient, kernels, stride, padding, inputsGradient);
 }