class_docstr:     The strategy for sequence decoding. Support beam seach only temporally.
  Parameters
  ----------
  beam_size: int
      The beam size for beam search.
  batch_graph: GraphData
      The input graph
  decoder: DecoderBase
      The decoder instance.
  rnn_type: str, option=["lstm", "gru"]
      The type of RNN.
  use_copy: bool, default=False
      Whether use ``copy`` mechanism. See pointer network. Note that you must use attention first.
  use_coverage: bool, default=False
      Whether use ``coverage`` mechanism. Note that you must use attention first.
  max_decoder_step: int, default=50
      The maximal decoding step.
code: def __init__(
      self,
      beam_size,
      vocab,
      decoder: DecoderBase,
      rnn_type,
      use_copy=False,
      use_coverage=False,
      max_decoder_step=50,
  ):
      super(DecoderStrategy, self).__init__()
      self.rnn_type = rnn_type
      self.beam_size = beam_size
      self.decoder = decoder
      self.vocab = vocab
      self.use_copy = use_copy
      self.use_coverage = use_coverage
      self.max_decoder_step = max_decoder_step
  
imports: from copy import deepcopy
  import torch
  import torch.nn
  from graph4nlp.pytorch.modules.prediction.generation.base import DecoderBase
label_desc: Use image node_id 1 to create a new DecoderStrategy object from inherited base classes: StrategyBase with example: obj = DecoderStrategy(beam_size, vocab, decoder, rnn_type, use_copy, use_coverage, max_decoder_step)