class_docstr: Transformer encoder-decoder layer.
  
  Args:
    config: TransformerConfig dataclass containing hyperparameters.
docstr: Applies EncoderDecoder1DBlock module.
  
  Args:
    inputs: input data for decoder
    decoder_mask: decoder self-attention mask.
  
  Returns:
    output after transformer encoder-decoder block.
docstr_tok: ["Applies","EncoderDecoder1DBlock","module",".","Args",":","inputs",":","input","data","for","decoder","decoder_mask",":","decoder","self-attention","mask",".","Returns",":","output","after","transformer","encoder-decoder","block","."]
code: def __call__(
      self,
      inputs: jax.Array,
      *,
      decoder_mask: jax.Array | None = None,
      rngs: nnx.Rngs | None = None,
  ):
      """Applies EncoderDecoder1DBlock module.
  
      Args:
        inputs: input data for decoder
        decoder_mask: decoder self-attention mask.
  
      Returns:
        output after transformer encoder-decoder block.
      """
      # Decoder block.
      assert inputs.ndim == 3
      x = self.ln1(inputs)
      x = self.attention(x, mask=decoder_mask, rngs=rngs)
      x = self.dropout(x, rngs=rngs)
      x = x + inputs
      # MLP block.
      z = self.ln2(x)
      z = self.mlp(z, rngs=rngs)
      return x + z
  
imports: from __future__ import annotations
  import dataclasses
  from typing import Any, Optional
  import jax
  import jax.numpy
  import numpy
  from jax import lax
  from flax.experimental import nnx
  from flax.experimental.nnx.nnx import flaglib
  from flax.experimental.nnx.examples.lm1b.configs import default
label_desc: Use image node_id 2 for calling the EncoderDecoder1DBlock obj's underlying member method code with example usage: obj.__call__(inputs) and returns: unknown