class_docstr: Default RNNLM for `LMInterface` Implementation.
  
  Note:
      PyTorch seems to have memory leak when one GPU compute this after data parallel.
      If parallel GPUs compute this, it seems to be fine.
      See also https://github.com/espnet/espnet/issues/1075
class_docstr_tok: ["Default","RNNLM","for","`","LMInterface","`","Implementation",".","Note",":","PyTorch","seems","to","have","memory","leak","when","one","GPU","compute","this","after","data","parallel",".","If","parallel","GPUs","compute","this",",","it","seems","to","be","fine",".","See","also","https",":","\/\/github.com\/espnet\/espnet\/issues\/1075"]
docstr: Add arguments to command line argument parser.
docstr_tok: ["Add","arguments","to","command","line","argument","parser","."]
code: def add_arguments(parser):
      """Add arguments to command line argument parser."""
      parser.add_argument(
          "--type",
          type=str,
          default="lstm",
          nargs="?",
          choices=["lstm", "gru"],
          help="Which type of RNN to use",
      )
      parser.add_argument(
          "--layer",
          "-l",
          type=int,
          default=2,
          help="Number of hidden layers",
      )
      parser.add_argument(
          "--unit",
          "-u",
          type=int,
          default=650,
          help="Number of hidden units",
      )
      parser.add_argument(
          "--embed-unit",
          default=None,
          type=int,
          help="Number of hidden units in embedding layer, "
          "if it is not specified, it keeps the same number with hidden units.",
      )
      parser.add_argument(
          "--dropout-rate",
          type=float,
          default=0.5,
          help="dropout probability",
      )
      parser.add_argument(
          "--emb-dropout-rate",
          type=float,
          default=0.0,
          help="emb dropout probability",
      )
      parser.add_argument(
          "--tie-weights",
          type=strtobool,
          default=False,
          help="Tie input and output embeddings",
      )
      return parser
  
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 1 for calling the DefaultRNNLM obj's underlying member method code with example usage: obj.add_arguments(parser) and returns: parser