Skip to contents

A recurrent neural network as a torch::nn_module, designed for quantile regression.

Usage

QRNN_RNN_net(
  type = c("lstm", "gru"),
  nb_input_features,
  hidden_size,
  num_layers = 1,
  dropout = 0
)

Arguments

type

the type of recurrent architecture, can be one of "lstm" (default) or "gru",

nb_input_features

the input size (i.e. the number of features),

hidden_size

the dimension of the hidden latent state variables in the recurrent network,

num_layers

the number of recurrent layers,

dropout

probability parameter for dropout before each hidden layer for regularization during training.

Details

The constructor allows specifying:

  • typethe type of recurrent architecture, can be one of "lstm" (default) or "gru",

  • nb_input_featuresthe input size (i.e. the number of features),

  • hidden_sizethe dimension of the hidden latent state variables in the recurrent network,

  • num_layersthe number of recurrent layers,

  • dropoutprobability parameter for dropout before each hidden layer for regularization during training.