class_docstr: Blurs the input tensor spatially whilst preserving edges. Can run on 1D, 2D, or 3D,
  tensors (on top of Batch and Channel dimensions). Two implementations are provided,
  an exact solution and a much faster approximation which uses a permutohedral lattice.
  
  See:
      https://en.wikipedia.org/wiki/Bilateral_filter
      https://graphics.stanford.edu/papers/permutohedral/
  
  Args:
      input: input tensor.
      spatial_sigma: the standard deviation of the spatial blur. Higher values can
          hurt performance when not using the approximate method (see fast approx).
      color_sigma: the standard deviation of the color blur. Lower values preserve
          edges better whilst higher values tend to a simple gaussian spatial blur.
      fast approx: This flag chooses between two implementations. The approximate method may
          produce artifacts in some scenarios whereas the exact solution may be intolerably
          slow for high spatial standard deviations.
  
  Returns:
      output (torch.Tensor): output tensor.
class_docstr_tok: ["Blurs","the","input","tensor","spatially","whilst","preserving","edges",".","Can","run","on","1D",",","2D",",","or","3D",",","tensors","(","on","top","of","Batch","and","Channel","dimensions",")",".","Two","implementations","are","provided",",","an","exact","solution","and","a","much","faster","approximation","which","uses","a","permutohedral","lattice",".","See",":","https",":","\/\/en.wikipedia.org\/wiki\/Bilateral_filter","https",":","\/\/graphics.stanford.edu\/papers\/permutohedral\/","Args",":","input",":","input","tensor",".","spatial_sigma",":","the","standard","deviation","of","the","spatial","blur",".","Higher","values","can","hurt","performance","when","not","using","the","approximate","method","(","see","fast","approx",")",".","color_sigma",":","the","standard","deviation","of","the","color","blur",".","Lower","values","preserve","edges","better","whilst","higher","values","tend","to","a","simple","gaussian","spatial","blur",".","fast","approx",":","This","flag","chooses","between","two","implementations",".","The","approximate","method","may","produce","artifacts","in","some","scenarios","whereas","the","exact","solution","may","be","intolerably","slow","for","high","spatial","standard","deviations",".","Returns",":","output","(","torch.Tensor",")",":","output","tensor","."]
docstr: autograd backward
docstr_tok: ["autograd","backward"]
code: def backward(ctx, grad_output):
      """autograd backward"""
      spatial_sigma, color_sigma, fast_approx = ctx.ss, ctx.cs, ctx.fa
      grad_input = _C.bilateral_filter(
          grad_output, spatial_sigma, color_sigma, fast_approx
      )
      return grad_input, None, None, None
  
imports: from __future__ import annotations
  import torch
  from monai.utils.module import optional_import
label_desc: Use image node_id 2 for calling the BilateralFilter obj's underlying member method code with example usage: obj.backward(ctx, grad_output) and returns: grad_input,  None,  None,  None