SimpleRNN

class eyefeatures.deep.models.SimpleRNN(rnn_type, input_size, hidden_size, num_layers=1, bidirectional=False, pre_rnn_linear_size=None)[source]

Bases: Module

A simple recurrent neural network (RNN) module that supports RNN, LSTM, and GRU architectures.

Parameters:
  • rnn_type – (str) Type of RNN (‘RNN’, ‘LSTM’, or ‘GRU’).

  • input_size – (int) Number of input features.

  • hidden_size – (int) Number of hidden units.

  • num_layers – (int, optional) Number of RNN layers. Default is 1.

  • bidirectional – (bool, optional) Whether the RNN is bidirectional. Default is False.

  • pre_rnn_linear_size – (int, optional) Size of the optional linear layer before the RNN.

Returns:

Output tensor after the RNN and fully connected layer.