class_docstr: A reference version of nn.quantized.Conv2d
  we will not pack the parameters in this module, since weight packing is an
  optimization for quantized backends supported in PyTorch (fbgemm/qnnpack),
  this is useful when user want to use this module in other backends like Glow.
class_docstr_tok: ["A","reference","version","of","nn.quantized.Conv2d","we","will","not","pack","the","parameters","in","this","module",",","since","weight","packing","is","an","optimization","for","quantized","backends","supported","in","PyTorch","(","fbgemm\/qnnpack",")",",","this","is","useful","when","user","want","to","use","this","module","in","other","backends","like","Glow","."]
code: def from_float(cls, float_conv, weight_qparams):
      qref_conv = cls(
          float_conv.in_channels,
          float_conv.out_channels,
          float_conv.kernel_size,  # type: ignore[arg-type]
          float_conv.stride,  # type: ignore[arg-type]
          float_conv.padding,  # type: ignore[arg-type]
          float_conv.dilation,  # type: ignore[arg-type]
          float_conv.groups,
          float_conv.bias is not None,  # type: ignore[arg-type]
          float_conv.padding_mode,
          device=float_conv.weight.device,
          dtype=float_conv.weight.dtype,
          weight_qparams=weight_qparams,
      )
      qref_conv.weight = torch.nn.Parameter(float_conv.weight.detach())
      if float_conv.bias is not None:
          qref_conv.bias = torch.nn.Parameter(float_conv.bias.detach())
      return qref_conv
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from typing import Optional, Dict, Any, List
  from torch.nn.common_types import _size_1_t
  from .utils import ReferenceQuantizedModule
label_desc: Use image node_id 1 for calling the _ConvNd obj's underlying member method code with example usage: obj.from_float(cls, float_conv, weight_qparams) and returns: qref_conv