Attention
=========

.. currentmodule:: penzai.nn.attention

.. autoclass:: Attention
  :members:
  :special-members:
  :show-inheritance:


  
  
    
    
    
    
    

  

  
  
  
  
  
  
  
  
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

  
  .. rubric:: Methods
  .. autosummary::
  
    
    ~Attention.__init__
    
    
    
    
    
    
    
    
    
    
    
    
    ~Attention.__call__
    
  

  
  .. rubric:: Attributes
  .. autosummary::
  
    ~Attention.input_to_query
    ~Attention.input_to_key
    ~Attention.input_to_value
    ~Attention.query_key_to_attn
    ~Attention.attn_value_to_output
  

  

  .. rubric:: Inherited Methods
  .. raw:: html

    <details style="margin-bottom: 1.5rem">
      <summary style="font-style:italic">(expand to view inherited methods)</summary>

  .. autosummary::
  
    
    
    ~Attention.attributes_dict
    
    
    ~Attention.bind_variables
    
    
    ~Attention.from_attributes
    
    
    ~Attention.key_for_field
    
    
    ~Attention.select
    
    
    ~Attention.stateless_call
    
    
    ~Attention.tree_flatten
    
    
    ~Attention.tree_flatten_with_keys
    
    
    ~Attention.tree_unflatten
    
    
    ~Attention.treescope_color
    
    

  .. raw:: html

    </details>

  