docstr: lr_x and lr_y should be the same shape, except lr_x[1] == 1.
  The heigh and width of hr_x should be larger than lr_x and have the same channels.
docstr_tok: ["lr_x","and","lr_y","should","be","the","same","shape",",","except","lr_x","[","1","]","==","1",".","The","heigh","and","width","of","hr_x","should","be","larger","than","lr_x","and","have","the","same","channels","."]
code: def forward(self, lr_x, lr_y, hr_x):
      """
      lr_x and lr_y should be the same shape, except lr_x[1] == 1.
      The heigh and width of hr_x should be larger than lr_x and have the same channels.
      """
      mean_x = self.boxfileter(lr_x)
      mean_y = self.boxfileter(lr_y)
      cov_xy = self.boxfileter(lr_x * lr_y) - mean_x * mean_y
      var_x = self.boxfileter(lr_x * lr_x) - mean_x * mean_x
      A = cov_xy / (var_x + self.eps)
      b = mean_y - A * mean_x
      A = F.interpolate(
          A,
          paddle.shape(hr_x)[2:],
          mode="bilinear",
          align_corners=False,
      )
      b = F.interpolate(
          b,
          paddle.shape(hr_x)[2:],
          mode="bilinear",
          align_corners=False,
      )
  
      return A * hr_x + b
  
file_path: PaddleSeg/Matting/ppmatting/models/layers/guided_filter.py
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 2 for calling the FastGuidedFilter obj's underlying member method code with example usage: obj.forward(lr_x, lr_y, hr_x) and returns: unknown