class_docstr: A pytorch RNNLM.
class_docstr_tok: ["A","pytorch","RNNLM","."]
docstr: Initialize state.
docstr_tok: ["Initialize","state","."]
code: def zero_state(self, batchsize):
      """Initialize state."""
      p = next(self.parameters())
      return torch.zeros(batchsize, self.n_units).to(
          device=p.device, dtype=p.dtype
      )
  
imports: import logging
  from typing import Any, List, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from espnet.nets.lm_interface import LMInterface
  from espnet.nets.pytorch_backend.e2e_asr import to_device
  from espnet.nets.scorer_interface import BatchScorerInterface
  from espnet.utils.cli_utils import strtobool
label_desc: Use image node_id 2 for calling the RNNLM obj's underlying member method code with example usage: obj.zero_state(batchsize) and returns: torch