class_docstr: The class for DBNet head.
  
  This was partially adapted from https://github.com/MhLiao/DB
  
  Args:
      in_channels (int): The number of input channels.
      with_bias (bool): Whether add bias in Conv2d layer. Defaults to False.
      module_loss (dict): Config of loss for dbnet. Defaults to
          ``dict(type='DBModuleLoss')``
      postprocessor (dict): Config of postprocessor for dbnet.
      init_cfg (dict or list[dict], optional): Initialization configs.
class_docstr_tok: ["The","class","for","DBNet","head",".","This","was","partially","adapted","from","https",":","\/\/github.com\/MhLiao\/DB","Args",":","in_channels","(","int",")",":","The","number","of","input","channels",".","with_bias","(","bool",")",":","Whether","add","bias","in","Conv2d","layer",".","Defaults","to","False",".","module_loss","(","dict",")",":","Config","of","loss","for","dbnet",".","Defaults","to","``","dict","(","type='DBModuleLoss","'",")","``","postprocessor","(","dict",")",":","Config","of","postprocessor","for","dbnet",".","init_cfg","(","dict","or","list","[","dict","]",",","optional",")",":","Initialization","configs","."]
docstr: Differential binarization.
  
  Args:
      prob_map (Tensor): Probability map.
      thr_map (Tensor): Threshold map.
      k (int): Amplification factor.
  
  Returns:
      Tensor: Binary map.
docstr_tok: ["Differential","binarization",".","Args",":","prob_map","(","Tensor",")",":","Probability","map",".","thr_map","(","Tensor",")",":","Threshold","map",".","k","(","int",")",":","Amplification","factor",".","Returns",":","Tensor",":","Binary","map","."]
code: def _diff_binarize(
      self, prob_map: Tensor, thr_map: Tensor, k: int
  ) -> Tensor:
      """Differential binarization.
  
      Args:
          prob_map (Tensor): Probability map.
          thr_map (Tensor): Threshold map.
          k (int): Amplification factor.
  
      Returns:
          Tensor: Binary map.
      """
      return torch.reciprocal(
          1.0 + torch.exp(-k * (prob_map - thr_map))
      )
  
file_path: mmocr/mmocr/models/textdet/heads/db_head.py
imports: from typing import Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from mmengine.model import Sequential
  from torch import Tensor
  from mmocr.models.textdet.heads import BaseTextDetHead
  from mmocr.registry import MODELS
  from mmocr.structures import TextDetDataSample
  from mmocr.utils.typing_utils import DetSampleList
label_desc: Use image node_id 2 for calling the DBHead obj's underlying member method code with example usage: obj._diff_binarize(prob_map, thr_map, k) and returns: torch