class_docstr: Dummy Decoder that delegates to individual real Decoders.
docstr: See :func:`onmt.decoders.decoder.DecoderBase.forward()`.
docstr_tok: ["See",":","func",":","`","onmt.decoders.decoder.DecoderBase.forward","(",")","`","."]
code: def forward(self, tgt, enc_out, src_len=None, step=None, **kwargs):
      """See :func:`onmt.decoders.decoder.DecoderBase.forward()`."""
      # src_len is a single tensor shared between all models.
      # This assumption will not hold if Translator is modified
      # to calculate src_len as something other than the length
      # of the input.
      dec_outs, attns = zip(
          *[
              model_decoder(
                  tgt, enc_out[i], src_len=src_len, step=step, **kwargs
              )
              for i, model_decoder in enumerate(self.model_decoders)
          ]
      )
      mean_attns = self.combine_attns(attns)
      return EnsembleDecoderOutput(dec_outs), mean_attns
  
imports: import torch
  import torch.nn
  from onmt.encoders.encoder import EncoderBase
  from onmt.decoders.decoder import DecoderBase
  from onmt.models import NMTModel
  import onmt.model_builder
label_desc: Use image node_id 2 for calling the EnsembleDecoder obj's underlying member method code with example usage: obj.forward(tgt, enc_out, src_len, step) and returns: EnsembleDecoderOutput,  mean_attns