netket.experimental.nn.rnn.RNNLayer#

class netket.experimental.nn.rnn.RNNLayer[source]#

Bases: Module

Recurrent neural network layer that maps inputs at N sites to outputs at N sites.

Attributes
inv_reorder_idx: Optional[HashableArray] = None#

indices to transform the inputs from ordered to unordered. See netket.models.AbstractARNN.reorder() for details.

prev_neighbors: Optional[HashableArray] = None#

previous neighbors of each site.

reorder_idx: Optional[HashableArray] = None#

indices to transform the inputs from unordered to ordered. See netket.models.AbstractARNN.reorder() for details.

unroll: int = 1#

how many steps to unroll in the recurrent loop. Trades compile time for faster runtime when networks are small.

cell: RNNCell#

cell to update the hidden memory at each site, such as LSTM or GRU.

exclusive: bool#

True if an output element does not depend on the input element at the same index.

Methods
__call__(inputs)[source]#

Applies the RNN cell to a batch of input sequences.

Parameters:

inputs – input data with dimensions (batch, n_sites, features).

Returns:

The output sequences.