class_docstr: A LinearTanh module fused from Linear and Tanh modules
  
  We adopt the same interface as :class:`torch.ao.nn.quantized.Linear`.
  
  Attributes:
      Same as torch.ao.nn.quantized.Linear
  
  Examples::
  
      >>> # xdoctest: +SKIP
      >>> m = nn.intrinsic.LinearTanh(20, 30)
      >>> input = torch.randn(128, 20)
      >>> output = m(input)
      >>> print(output.size())
      torch.Size([128, 30])
code: def from_float(cls, mod):
      assert (
          type(mod) == nni.LinearTanh
      ), "Input float module should be LinearTanh"
      assert hasattr(
          mod, "qconfig"
      ), "Input float module must have qconfig defined"
      activation_post_process = mod.activation_post_process
      mod = mod[0]
      weight_post_process = mod.qconfig.weight()
      weight_post_process(mod.weight)
      dtype = weight_post_process.dtype
      act_scale, act_zp = activation_post_process.calculate_qparams()  # type: ignore[union-attr,operator]
      assert (
          dtype == torch.qint8
      ), "Weight observer must have dtype torch.qint8"
      qweight = _quantize_weight(
          mod.weight.float(), weight_post_process
      )
      qlinear_tanh = cls(mod.in_features, mod.out_features, dtype=dtype)
      qlinear_tanh.set_weight_bias(qweight, mod.bias)
      qlinear_tanh.scale = float(act_scale)
      qlinear_tanh.zero_point = int(act_zp)
      return qlinear_tanh
  
imports: import torch
  import torch.ao.nn.quantized
  import torch.ao.nn.intrinsic
  from torch.ao.nn.quantized.modules.utils import _quantize_weight
label_desc: Use image node_id 4 for calling the LinearTanh obj's underlying member method code with example usage: obj.from_float(cls, mod) and returns: qlinear_tanh