class_docstr: Masked square dice loss.
  
  Args:
      eps (float, optional): Eps to avoid zero-divison error.  Defaults to
          1e-3.
class_docstr_tok: ["Masked","square","dice","loss",".","Args",":","eps","(","float",",","optional",")",":","Eps","to","avoid","zero-divison","error",".","Defaults","to","1e-3","."]
code: def __init__(self, eps: float = 1e-3) -> None:
      super().__init__()
      assert isinstance(eps, float)
      self.eps = eps
  
file_path: mmocr/mmocr/models/common/losses/dice_loss.py
imports: from typing import Optional
  import torch
  import torch.nn
  from mmocr.registry import MODELS
label_desc: Use image node_id 1 to create a new MaskedSquareDiceLoss object from inherited base classes: nn with example: obj = MaskedSquareDiceLoss(eps)