class_docstr: A long short-term memory (LSTM) cell.
  
  DP-friendly drop-in replacement of the ``torch.nn.LSTMCell`` module to use in ``DPLSTM``.
  Refer to ``torch.nn.LSTMCell`` documentation for the model description, parameters and inputs/outputs.
class_docstr_tok: ["A","long","short-term","memory","(","LSTM",")","cell",".","DP-friendly","drop-in","replacement","of","the","``","torch.nn.LSTMCell","``","module","to","use","in","``","DPLSTM","``",".","Refer","to","``","torch.nn.LSTMCell","``","documentation","for","the","model","description",",","parameters","and","inputs\/outputs","."]
code: def forward(
      self,
      input: Tensor,
      hx: Optional[Tuple[Tensor, Tensor]] = None,
      batch_size_t: Optional[int] = None,
  ) -> Tuple[Tensor, Tensor]:
      if hx is None:
          zeros = torch.zeros(
              input.shape[0],
              self.hidden_size,
              dtype=input.dtype,
              device=input.device,
          )
          hx = (zeros, zeros)
  
      h_prev, c_prev = hx
  
      if batch_size_t is None:
          gates = self.ih(input) + self.hh(h_prev)  # [B, 4*D]
      else:
          gates = self.ih(input) + self.hh(
              h_prev[:batch_size_t, :]
          )  # [batch_size_t, 4*D]
  
      i_t_input, f_t_input, g_t_input, o_t_input = torch.split(
          gates, self.hidden_size, 1
      )
  
      # [B, D] or [batch_size_t, D] if batch_size_t is not None
      i_t = torch.sigmoid(i_t_input)
      f_t = torch.sigmoid(f_t_input)
      g_t = torch.tanh(g_t_input)
      o_t = torch.sigmoid(o_t_input)
  
      if batch_size_t is None:
          c_t = f_t * c_prev + i_t * g_t
      else:
          c_t = f_t * c_prev[:batch_size_t, :] + i_t * g_t
  
      h_t = o_t * torch.tanh(c_t)
      return h_t, c_t
  
imports: import math
  import numbers
  import warnings
  from typing import List, Optional, Tuple, Type, Union
  import torch
  import torch.nn
  from torch import Tensor
  from torch.nn.utils.rnn import PackedSequence
  from ..utils.packed_sequences import compute_seq_lengths
  from .param_rename import RenameParamsMixin
label_desc: Use image node_id 2 for calling the DPLSTMCell obj's underlying member method code with example usage: obj.forward(input, hx, batch_size_t) and returns: h_t,  c_t