class_docstr: This is a wrapper class.
  It smooths the input and target at different scales before passing them into the wrapped loss function.
  
  Adapted from:
      DeepReg (https://github.com/DeepRegNet/DeepReg)
class_docstr_tok: ["This","is","a","wrapper","class",".","It","smooths","the","input","and","target","at","different","scales","before","passing","them","into","the","wrapped","loss","function",".","Adapted","from",":","DeepReg","(","https",":","\/\/github.com\/DeepRegNet\/DeepReg",")"]
docstr: Args:
      loss: loss function to be wrapped
      scales: list of scalars or None, if None, do not apply any scaling.
      kernel: gaussian or cauchy.
docstr_tok: ["Args",":","loss",":","loss","function","to","be","wrapped","scales",":","list","of","scalars","or","None",",","if","None",",","do","not","apply","any","scaling",".","kernel",":","gaussian","or","cauchy","."]
code: def __init__(
      self,
      loss: _Loss,
      scales: list | None = None,
      kernel: str = "gaussian",
      reduction: LossReduction | str = LossReduction.MEAN,
  ) -> None:
      """
      Args:
          loss: loss function to be wrapped
          scales: list of scalars or None, if None, do not apply any scaling.
          kernel: gaussian or cauchy.
      """
      super().__init__(reduction=LossReduction(reduction).value)
      if kernel not in kernel_fn_dict:
          raise ValueError(
              f"got unsupported kernel type: {kernel}",
              "only support gaussian and cauchy",
          )
      self.kernel_fn = kernel_fn_dict[kernel]
      self.loss = loss
      self.scales = scales
  
file_path: MONAI/monai/losses/multi_scale.py
imports: from __future__ import annotations
  import torch
  from torch.nn.modules.loss import _Loss
  from monai.networks.layers import gaussian_1d, separable_filtering
  from monai.utils import LossReduction
label_desc: Use image node_id 1 to create a new MultiScaleLoss object from inherited base classes: _Loss with example: obj = MultiScaleLoss(loss, scales, kernel, reduction)