Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions
torch::nn::detail::RNNOptionsBase Struct Referenceabstract

Common options for LSTM and GRU modules. More...

#include <rnn.h>

Public Member Functions

 RNNOptionsBase (int64_t input_size, int64_t hidden_size)
 
 TORCH_ARG (int64_t, input_size)
 The number of features of a single sample in the input sequence x.
 
 TORCH_ARG (int64_t, hidden_size)
 The number of features in the hidden state h.
 
 TORCH_ARG (int64_t, layers)
 The number of recurrent layers (cells) to use.
 
 TORCH_ARG (bool, with_bias)
 Whether a bias term should be added to all linear operations.
 
 TORCH_ARG (double, dropout)=0.0
 If non-zero, adds dropout with the given probability to the output of each RNN layer, except the final layer. More...
 
 TORCH_ARG (bool, bidirectional)
 Whether to make the RNN bidirectional.
 
 TORCH_ARG (bool, batch_first)
 If true, the input sequence should be provided as (batch, sequence, features). More...
 

Detailed Description

Common options for LSTM and GRU modules.

Definition at line 32 of file rnn.h.

Member Function Documentation

torch::nn::detail::RNNOptionsBase::TORCH_ARG ( double  ,
dropout   
)
pure virtual

If non-zero, adds dropout with the given probability to the output of each RNN layer, except the final layer.

torch::nn::detail::RNNOptionsBase::TORCH_ARG ( bool  ,
batch_first   
)

If true, the input sequence should be provided as (batch, sequence, features).

If false (default), the expected layout is (sequence, batch, features).


The documentation for this struct was generated from the following files: