graphorge.gnn_base_model.model.gnn_architectures.build_rnn¶
- build_rnn(input_size, hidden_layer_sizes, output_size, num_layers=None, rnn_cell='GRU', bias=True)[source]¶
Build multilayer recurrent neural network.
- Parameters:
input_size (int) – Number of neurons of input layer.
hidden_layer_sizes (list[int]) – Number of neurons of hidden layers.
output_size (int) – Number of neurons of output layer.
num_layers (list[int], default=None) – Number of layers in each RNN module. Defaults to None.
rnn_cell (str, default='GRU') – RNN architecture cell.
bias (bool, default=True) – Whether to use bias within the RNN cell.
- Returns:
rnn – Multilayer recurrent neural network with linear output layer.
- Return type:
torch.nn.Sequential