class_docstr: 所有 **Sequence2Sequence Encoder** 的基类。需要实现 :meth:`forward` 函数
class_docstr_tok: ["\u6240\u6709","*","*","Sequence2Sequence","Encoder","*","*","\u7684\u57fa\u7c7b\u3002\u9700\u8981\u5b9e\u73b0",":","meth",":","`","forward","`","\u51fd\u6570"]
code: def __init__(self):
      super().__init__()
  
imports: import torch.nn
  import torch
  from torch.nn import LayerNorm
  import torch.nn.functional
  from typing import Union, Tuple
  from ....core.utils import seq_len_to_mask
  import math
  from .lstm import LSTM
  from ..attention import MultiHeadAttention
  from ....embeddings.torch import StaticEmbedding
  from ....embeddings.torch.utils import get_embeddings
label_desc: Use image node_id 1 to create a new Seq2SeqEncoder object from inherited base classes: nn with example: obj = Seq2SeqEncoder()