class_docstr: A quantizable long short-term memory (LSTM) cell.
  
  For the description and the argument types, please, refer to :class:`~torch.nn.LSTMCell`
  
  Examples::
  
      >>> import torch.ao.nn.quantizable as nnqa
      >>> rnn = nnqa.LSTMCell(10, 20)
      >>> input = torch.randn(6, 10)
      >>> hx = torch.randn(3, 20)
      >>> cx = torch.randn(3, 20)
      >>> output = []
      >>> for i in range(6):
      ...     hx, cx = rnn(input[i], (hx, cx))
      ...     output.append(hx)
class_docstr_tok: ["A","quantizable","long","short-term","memory","(","LSTM",")","cell",".","For","the","description","and","the","argument","types",",","please",",","refer","to",":","class",":","`","~torch.nn.LSTMCell","`","Examples",":",":",">",">",">","import","torch.ao.nn.quantizable","as","nnqa",">",">",">","rnn","=","nnqa.LSTMCell","(","10",",","20",")",">",">",">","input","=","torch.randn","(","6",",","10",")",">",">",">","hx","=","torch.randn","(","3",",","20",")",">",">",">","cx","=","torch.randn","(","3",",","20",")",">",">",">","output","=","[","]",">",">",">","for","i","in","range","(","6",")",":","...","hx",",","cx","=","rnn","(","input","[","i","]",",","(","hx",",","cx",")",")","...","output.append","(","hx",")"]
code: def __init__(
      self,
      input_dim: int,
      hidden_dim: int,
      bias: bool = True,
      device=None,
      dtype=None,
  ) -> None:
      factory_kwargs = {"device": device, "dtype": dtype}
      super().__init__()
      self.input_size = input_dim
      self.hidden_size = hidden_dim
      self.bias = bias
  
      self.igates = torch.nn.Linear(
          input_dim, 4 * hidden_dim, bias=bias, **factory_kwargs
      )
      self.hgates = torch.nn.Linear(
          hidden_dim, 4 * hidden_dim, bias=bias, **factory_kwargs
      )
      self.gates = torch.ao.nn.quantized.FloatFunctional()
  
      self.input_gate = torch.nn.Sigmoid()
      self.forget_gate = torch.nn.Sigmoid()
      self.cell_gate = torch.nn.Tanh()
      self.output_gate = torch.nn.Sigmoid()
  
      self.fgate_cx = torch.ao.nn.quantized.FloatFunctional()
      self.igate_cgate = torch.ao.nn.quantized.FloatFunctional()
      self.fgate_cx_igate_cgate = (
          torch.ao.nn.quantized.FloatFunctional()
      )
  
      self.ogate_cy = torch.ao.nn.quantized.FloatFunctional()
  
      self.initial_hidden_state_qparams: Tuple[float, int] = (1.0, 0)
      self.initial_cell_state_qparams: Tuple[float, int] = (1.0, 0)
      self.hidden_state_dtype: torch.dtype = torch.quint8
      self.cell_state_dtype: torch.dtype = torch.quint8
  
imports: import numbers
  from typing import Optional, Tuple
  import warnings
  import torch
  from torch import Tensor
label_desc: Use image node_id 1 to create a new LSTMCell object from inherited base classes: torch.nn with example: obj = LSTMCell(input_dim, hidden_dim, bias, device, dtype)