class_docstr: We'll store weight_qparams for all the weights (weight_ih and weight_hh),
  we need to pass in a `weight_qparams_dict` that maps from weight name,
  e.g. weight_ih, to the weight_qparams for that weight
class_docstr_tok: ["We","'ll","store","weight_qparams","for","all","the","weights","(","weight_ih","and","weight_hh",")",",","we","need","to","pass","in","a","`","weight_qparams_dict","`","that","maps","from","weight","name",",","e.g",".","weight_ih",",","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.bias,
          mod.weight_ih.device,
          mod.weight_ih.dtype,
          weight_qparams_dict,
      )
      ref_mod.weight_ih = mod.weight_ih
      ref_mod.weight_hh = mod.weight_hh
      ref_mod.bias_ih = mod.bias_ih
      ref_mod.bias_hh = mod.bias_hh
      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 4 for calling the GRUCell obj's underlying member method code with example usage: obj.from_float(cls, mod, weight_qparams_dict) and returns: ref_mod