class_docstr: Transformer Model for sequence to sequence translation.
  
  Attributes:
    config: TransformerConfig dataclass containing hyperparameters.
class_docstr_tok: ["Transformer","Model","for","sequence","to","sequence","translation",".","Attributes",":","config",":","TransformerConfig","dataclass","containing","hyperparameters","."]
docstr: Applies Transformer model on the inputs.
  
  Args:
    inputs: input data.
    targets: target data.
    inputs_positions: input subsequence positions for packed examples.
    targets_positions: target subsequence positions for packed examples.
    inputs_segmentation: input segmentation info for packed examples.
    targets_segmentation: target segmentation info for packed examples.
  
  Returns:
    logits array from full transformer.
docstr_tok: ["Applies","Transformer","model","on","the","inputs",".","Args",":","inputs",":","input","data",".","targets",":","target","data",".","inputs_positions",":","input","subsequence","positions","for","packed","examples",".","targets_positions",":","target","subsequence","positions","for","packed","examples",".","inputs_segmentation",":","input","segmentation","info","for","packed","examples",".","targets_segmentation",":","target","segmentation","info","for","packed","examples",".","Returns",":","logits","array","from","full","transformer","."]
code: def __call__(
      self,
      inputs,
      targets,
      inputs_positions=None,
      targets_positions=None,
      inputs_segmentation=None,
      targets_segmentation=None,
  ):
      """Applies Transformer model on the inputs.
  
      Args:
        inputs: input data.
        targets: target data.
        inputs_positions: input subsequence positions for packed examples.
        targets_positions: target subsequence positions for packed examples.
        inputs_segmentation: input segmentation info for packed examples.
        targets_segmentation: target segmentation info for packed examples.
  
      Returns:
        logits array from full transformer.
      """
      encoded = self.encode(
          inputs,
          inputs_positions=inputs_positions,
          inputs_segmentation=inputs_segmentation,
      )
  
      return self.decode(
          encoded,
          inputs,  # only used for masks
          targets,
          targets_positions=targets_positions,
          inputs_segmentation=inputs_segmentation,
          targets_segmentation=targets_segmentation,
      )
  
imports: from typing import Callable, Any, Optional
  from flax import linen
  from flax import struct
  from jax import lax
  import jax.numpy
  import numpy
label_desc: Use image node_id 4 for calling the Transformer obj's underlying member method code with example usage: obj.__call__(inputs, targets, inputs_positions, targets_positions, inputs_segmentation, targets_segmentation) and returns: self