Struct rcudnn::utils::RnnConfig[][src]

pub struct RnnConfig {
    pub hidden_size: c_int,
    pub num_layers: c_int,
    pub sequence_length: c_int,
    // some fields omitted
}
Expand description

Provides an interfaces for CUDNN’s Rnn Descriptor

Arguments

  • rnn_desc Previously created descriptor
  • hidden_size Size of the hidden layer
  • num_layers Number of layers
  • dropout_desc Descriptor to a previously created & initialized dropout descriptor, applied between layers.
  • input_mode Specifies behaviour at the input to the first layer
  • direction_mode Specifies the recurrence pattern - i.e bidirectional
  • rnn_mode Type of network used in routines ForwardInference, ForwardTraining, BackwardData, BackwardWeights. Can be ReLU, tanh, LSTM (Long Short Term Memory), or GRU (Gated Recurrent Unit).
  • algo - Only required in v6 implementation FIXME: Should this be checked in compilation?
  • data_type Math Precision - default f32

The LSTM network offered by CUDNN is a four-gate network that does not use peephole connections. Greff, et al. (2015)1 suggests it doesn’t matter what kind of network it is, although Jozefowicz, et al. (2015)2 suggests that the most important gates are the forget and input, followed by the output gate, so the peephole connection isn’t as important to be concerned with. A positive bias, as encouraged in the paper, can be achieved by setting bias_mode to CUDNN_RNN_DOUBLE_BIAS, which is the default, or CUDN_RNN_SINGLE_INP_BIAS or CUDNN_RNN_SINGLE_REC_BIAS

Fields

hidden_size: c_int

Size of Hidden Layer

num_layers: c_int

Number of Hidden Layers

sequence_length: c_int

Length of Sequence

Implementations

Initialise a RNN Config

Workspace Size required for RNN Operations

Largest Workspace Size for RNN

Training Reserve Size for RNN

Training Reserve Space on GPU for RNN

Accessor function for Rnn Descriptor

Accessor function for Sequence Length

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.