class_docstr: :class:`~fastNLP.modules.torch.decoder.LSTMSeq2SeqDecoder` 对应的 :class:`State`，保存 ``encoder`` 的输出以及 ``LSTM`` 解码过程中的一些中间状态
  
  :param encoder_output: ``encoder`` 的输出，形状为 ``[batch_size, src_seq_len, encode_output_size]``
  :param encoder_mask: 掩码，形状为 ``[batch_size, src_seq_len]``，为 **1** 的地方表示需要 attend
  :param hidden: 上个时刻的 ``hidden`` 状态，形状为 ``[num_layers, batch_size, hidden_size]``
  :param cell: 上个时刻的 ``cell`` 状态，形状为 ``[num_layers, batch_size, hidden_size]``
class_docstr_tok: [":","class",":","`","~fastNLP.modules.torch.decoder.LSTMSeq2SeqDecoder","`","\u5bf9\u5e94\u7684",":","class",":","`","State","`","\uff0c\u4fdd\u5b58","``","encoder","``","\u7684\u8f93\u51fa\u4ee5\u53ca","``","LSTM","``","\u89e3\u7801\u8fc7\u7a0b\u4e2d\u7684\u4e00\u4e9b\u4e2d\u95f4\u72b6\u6001",":","param","encoder_output",":","``","encoder","``","\u7684\u8f93\u51fa\uff0c\u5f62\u72b6\u4e3a","``","[","batch_size",",","src_seq_len",",","encode_output_size","]","``",":","param","encoder_mask",":","\u63a9\u7801\uff0c\u5f62\u72b6\u4e3a","``","[","batch_size",",","src_seq_len","]","``","\uff0c\u4e3a","*","*","1","*","*","\u7684\u5730\u65b9\u8868\u793a\u9700\u8981","attend",":","param","hidden",":","\u4e0a\u4e2a\u65f6\u523b\u7684","``","hidden","``","\u72b6\u6001\uff0c\u5f62\u72b6\u4e3a","``","[","num_layers",",","batch_size",",","hidden_size","]","``",":","param","cell",":","\u4e0a\u4e2a\u65f6\u523b\u7684","``","cell","``","\u72b6\u6001\uff0c\u5f62\u72b6\u4e3a","``","[","num_layers",",","batch_size",",","hidden_size","]","``"]
code: def __init__(
      self,
      encoder_output: torch.FloatTensor,
      encoder_mask: torch.BoolTensor,
      hidden: torch.FloatTensor,
      cell: torch.FloatTensor,
  ):
      super().__init__(encoder_output, encoder_mask)
      self.hidden = hidden
      self.cell = cell
      self._input_feed = hidden[0]
  
file_path: fastNLP/fastNLP/modules/torch/decoder/seq2seq_state.py
imports: from typing import Union, List, Tuple
  import torch
label_desc: Use image node_id 1 to create a new LSTMState object from inherited base classes: State with example: obj = LSTMState(encoder_output, encoder_mask, hidden, cell)