Nabu-asr
Public Member Functions | List of all members
nabu.neuralnetworks.components.attention.BahdanauAttention Class Reference

normal Bahdanau Style attention More...

Inheritance diagram for nabu.neuralnetworks.components.attention.BahdanauAttention:

Public Member Functions

def __call__ (self, query, state)
 Score the query based on the keys and values. More...
 

Detailed Description

normal Bahdanau Style attention

Member Function Documentation

§ __call__()

def nabu.neuralnetworks.components.attention.BahdanauAttention.__call__ (   self,
  query,
  state 
)

Score the query based on the keys and values.

Parameters
queryTensor of dtype matching self.values and shape [batch_size, query_depth].
stateTensor of dtype matching self.values and shape [batch_size, alignments_size] (alignments_size is memory's max_time).
Returns
alignments Tensor of dtype matching self.values and shape [batch_size, alignments_size] (alignments_size is memory's max_time).

The documentation for this class was generated from the following file: