class_docstr: Container module with an encoder, a recurrent module, and a decoder.
class_docstr_tok: ["Container","module","with","an","encoder",",","a","recurrent","module",",","and","a","decoder","."]
docstr: Detach hidden states from their history.
docstr_tok: ["Detach","hidden","states","from","their","history","."]
code: def repackage_hidden(h):
      """Detach hidden states from their history."""
      if isinstance(h, torch.Tensor):
          return h.detach()
      else:
          return tuple([RNNModel.repackage_hidden(v) for v in h])
  
file_path: pytorch/test/onnx/model_defs/word_language_model.py
imports: from typing import Optional, Tuple
  import torch
  import torch.nn
  from torch import Tensor
label_desc: Use image node_id 2 for calling the RNNModel obj's underlying member method code with example usage: obj.repackage_hidden(h) and returns: h, tuple