class_docstr: Quantized version of `torch.nn.Softmax`. Adds quantization-specific arguments on top of `torch.nn.Softmax`.
  
  Args:
      output_bit (`int`):
          Bitwidth for the layer output activation.
      quant_mode (`bool`, *optional*, defaults to `False`):
          Whether or not the layer is quantized.
      force_dequant (`str`, *optional*, defaults to `"none"`):
          Force dequantize the layer if either "softmax" or "nonlinear" is given.
class_docstr_tok: ["Quantized","version","of","`","torch.nn.Softmax","`",".","Adds","quantization-specific","arguments","on","top","of","`","torch.nn.Softmax","`",".","Args",":","output_bit","(","`","int","`",")",":","Bitwidth","for","the","layer","output","activation",".","quant_mode","(","`","bool","`",",","*","optional","*",",","defaults","to","`","False","`",")",":","Whether","or","not","the","layer","is","quantized",".","force_dequant","(","`","str","`",",","*","optional","*",",","defaults","to","`","``","none","''","`",")",":","Force","dequantize","the","layer","if","either","``","softmax","''","or","``","nonlinear","''","is","given","."]
code: def __init__(
      self, output_bit, quant_mode=False, force_dequant="none"
  ):
      super().__init__()
      self.output_bit = output_bit
      self.max_bit = 32
      self.quant_mode = quant_mode
  
      if force_dequant in ["nonlinear", "softmax"]:
          logger.info("Force dequantize softmax")
          self.quant_mode = False
  
      self.act = QuantAct(16, quant_mode=self.quant_mode)
      self.x0 = -0.6931  # -ln2
      self.const = 30  # dummy integer constant
      self.coef = [0.35815147, 0.96963238, 1.0]  # ax**2 + bx + c
      self.coef[1] /= self.coef[0]
      self.coef[2] /= self.coef[0]
  
imports: import decimal
  import numpy
  import torch
  from torch import nn
  from torch.autograd import Function
  from ...utils import logging
label_desc: Use image node_id 1 to create a new IntSoftmax object from inherited base classes: nn with example: obj = IntSoftmax(output_bit, quant_mode, force_dequant)