class_docstr: Build Seqence-to-Sequence.
  
  Parameters:
  
  * `encoder`- encoder of seq2seq model. e.g. roberta
  * `decoder`- decoder of seq2seq model. e.g. transformer
  * `config`- configuration of encoder model.
  * `beam_size`- beam size for beam search.
  * `max_length`- max length of target for beam search.
  * `sos_id`- start of symbol ids in target for beam search.
  * `eos_id`- end of symbol ids in target for beam search.
code: def __init__(
      self,
      encoder,
      decoder,
      config,
      beam_size=None,
      max_length=None,
      sos_id=None,
      eos_id=None,
  ):
      super(Seq2Seq, self).__init__()
      self.encoder = encoder
      self.decoder = decoder
      self.config = config
      self.register_buffer("bias", torch.tril(torch.ones(2048, 2048)))
      self.dense = nn.Linear(config.hidden_size, config.hidden_size)
      self.lm_head = nn.Linear(
          config.hidden_size, config.vocab_size, bias=False
      )
      self.lsm = nn.LogSoftmax(dim=-1)
      self.tie_weights()
  
      self.beam_size = beam_size
      self.max_length = max_length
      self.sos_id = sos_id
      self.eos_id = eos_id
  
imports: import torch
  import torch.nn
  import numpy
  from transformers import RobertaConfig, RobertaModel, RobertaTokenizer, BartConfig, BartForConditionalGeneration, BartTokenizer, T5Config, T5ForConditionalGeneration, T5Tokenizer
  import logging
label_desc: Use image node_id 1 to create a new Seq2Seq object from inherited base classes: nn with example: obj = Seq2Seq(encoder, decoder, config, beam_size, max_length, sos_id, eos_id)