def forward(self, x):
        """
        Using convolution for box blur like RVM: <https://github.com/PeterL1n/RobustVideoMatting/>
        The original implementation: <https://github.com/wuhuikai/DeepGuidedFilter/>
        """
        kernel_size = 2 * self.r + 1
        kernel_x = paddle.full((x.shape[1], 1, 1, kernel_size), 1 / kernel_size)
        kernel_y = paddle.full((x.shape[1], 1, kernel_size, 1), 1 / kernel_size)
        x = F.conv2d(x, kernel_x, padding=(0, self.r), groups=x.shape[1])
        x = F.conv2d(x, kernel_y, padding=(self.r, 0), groups=x.shape[1])

        return x

        Using convolution for box blur like RVM: <https://github.com/PeterL1n/RobustVideoMatting/>
        The original implementation: <https://github.com/wuhuikai/DeepGuidedFilter/>
        
Matting/ppmatting/models/layers/guided_filter.py