class_docstr: torch.autograd.Function for the TrainableJointBilateralFilter layer.
  
  See:
      F. Wagner, et al., Trainable joint bilateral filters for enhanced prediction stability in
      low-dose CT, Scientific Reports (2022), https://doi.org/10.1038/s41598-022-22530-4
  
  Args:
      input: input tensor to be filtered.
      guide: guidance image tensor to be used during filtering.
      sigma x: trainable standard deviation of the spatial filter kernel in x direction.
      sigma y: trainable standard deviation of the spatial filter kernel in y direction.
      sigma z: trainable standard deviation of the spatial filter kernel in z direction.
      color sigma: trainable standard deviation of the intensity range kernel. This filter
          parameter determines the degree of edge preservation.
  
  Returns:
      output (torch.Tensor): filtered tensor.
class_docstr_tok: ["torch.autograd.Function","for","the","TrainableJointBilateralFilter","layer",".","See",":","F.","Wagner",",","et","al.",",","Trainable","joint","bilateral","filters","for","enhanced","prediction","stability","in","low-dose","CT",",","Scientific","Reports","(","2022",")",",","https",":","\/\/doi.org\/10.1038\/s41598-022-22530-4","Args",":","input",":","input","tensor","to","be","filtered",".","guide",":","guidance","image","tensor","to","be","used","during","filtering",".","sigma","x",":","trainable","standard","deviation","of","the","spatial","filter","kernel","in","x","direction",".","sigma","y",":","trainable","standard","deviation","of","the","spatial","filter","kernel","in","y","direction",".","sigma","z",":","trainable","standard","deviation","of","the","spatial","filter","kernel","in","z","direction",".","color","sigma",":","trainable","standard","deviation","of","the","intensity","range","kernel",".","This","filter","parameter","determines","the","degree","of","edge","preservation",".","Returns",":","output","(","torch.Tensor",")",":","filtered","tensor","."]
code: def forward(
      ctx,
      input_img,
      guidance_img,
      sigma_x,
      sigma_y,
      sigma_z,
      color_sigma,
  ):
      (
          output_tensor,
          output_weights_tensor,
          do_dx_ki,
          do_dsig_r,
          do_dsig_x,
          do_dsig_y,
          do_dsig_z,
      ) = _C.tjbf_forward(
          input_img,
          guidance_img,
          sigma_x,
          sigma_y,
          sigma_z,
          color_sigma,
      )
  
      ctx.save_for_backward(
          input_img,
          sigma_x,
          sigma_y,
          sigma_z,
          color_sigma,
          output_tensor,
          output_weights_tensor,
          do_dx_ki,
          do_dsig_r,
          do_dsig_x,
          do_dsig_y,
          do_dsig_z,
          guidance_img,
      )
  
      return output_tensor
  
imports: from __future__ import annotations
  import torch
  from monai.utils.module import optional_import
label_desc: Use image node_id 1 for calling the TrainableJointBilateralFilterFunction obj's underlying member method code with example usage: obj.forward(ctx, input_img, guidance_img, sigma_x, sigma_y, sigma_z, color_sigma) and returns: output_tensor