class_docstr: Quantized version of `torch.nn.GELU`. Adds quantization-specific arguments on top of `torch.nn.GELU`.
  
  Args:
      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 "gelu" or "nonlinear" is given.
class_docstr_tok: ["Quantized","version","of","`","torch.nn.GELU","`",".","Adds","quantization-specific","arguments","on","top","of","`","torch.nn.GELU","`",".","Args",":","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","``","gelu","''","or","``","nonlinear","''","is","given","."]
code: def __init__(self, quant_mode=True, force_dequant="none"):
      super().__init__()
      self.quant_mode = quant_mode
  
      if force_dequant in ["nonlinear", "gelu"]:
          logger.info("Force dequantize gelu")
          self.quant_mode = False
  
      if not self.quant_mode:
          self.activation_fn = nn.GELU()
  
      self.k = 1.4142
      self.const = 14  # dummy integer constant
      self.coeff = [-0.2888, -1.769, 1]  # a(x+b)**2 + c
      self.coeff[2] /= self.coeff[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 IntGELU object from inherited base classes: nn with example: obj = IntGELU(quant_mode, force_dequant)