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

this wraps an RNN cell to take the context and state and maps it to a fixed diension More...

Inheritance diagram for nabu.neuralnetworks.components.rnn_cell.AttentionProjectionWrapper:

Public Member Functions

def __init__ (self, cell, output_dim, activation=None)
 AttentionProjectionWrapper constructor takes the context and the state and maps to output_dim units. More...
 
def output_size (self)
 return cell output size
 
def state_size (self)
 return cell state size
 
def zero_state (self, batch_size, dtype)
 the cell zero state
 
def __call__ (self, inputs, state, scope=None)
 call wrapped cell with constant scope
 

Detailed Description

this wraps an RNN cell to take the context and state and maps it to a fixed diension

Constructor & Destructor Documentation

§ __init__()

def nabu.neuralnetworks.components.rnn_cell.AttentionProjectionWrapper.__init__ (   self,
  cell,
  output_dim,
  activation = None 
)

AttentionProjectionWrapper constructor takes the context and the state and maps to output_dim units.

Parameters
cellthe wrapped cell
output_dimthe number of output units
activationa nonlinearity to be applied after the mapping (default: linear)

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