class_docstr: Reference Quantized GRU Module
  We'll store weight_qparams for all the weights in _flat_weights, we need to pass in
  a `weight_qparams_dict` that maps from weight name, e.g. weight_ih_l0,
  to the weight_qparams for that weight
class_docstr_tok: ["Reference","Quantized","GRU","Module","We","'ll","store","weight_qparams","for","all","the","weights","in","_flat_weights",",","we","need","to","pass","in","a","`","weight_qparams_dict","`","that","maps","from","weight","name",",","e.g",".","weight_ih_l0",",","to","the","weight_qparams","for","that","weight"]
code: def from_float(cls, mod, weight_qparams_dict):
      ref_mod = cls(
          mod.input_size,
          mod.hidden_size,
          mod.num_layers,
          mod.bias,
          mod.batch_first,
          mod.dropout,
          mod.bidirectional,
          weight_qparams_dict=weight_qparams_dict,
      )
      for wn in mod._flat_weights_names:
          setattr(ref_mod, wn, getattr(mod, wn))
      return ref_mod
  
imports: import torch
  import torch.nn
  from torch import Tensor
  from .utils import _quantize_and_dequantize_weight
  from .utils import _quantize_weight
  from typing import Optional, Dict, Any, Tuple
  from torch import _VF
  from torch.nn.utils.rnn import PackedSequence
label_desc: Use image node_id 6 for calling the GRU obj's underlying member method code with example usage: obj.from_float(cls, mod, weight_qparams_dict) and returns: ref_mod