Class RNNCellImpl
Defined in File rnn.h
Page Contents
Inheritance Relationships
Base Type
public torch::nn::detail::RNNCellImplBase< RNNCellImpl >
(Template Class RNNCellImplBase)
Class Documentation
-
class RNNCellImpl : public torch::nn::detail::RNNCellImplBase<RNNCellImpl>
An Elman RNN cell with tanh or ReLU non-linearity.
See https://pytorch.org/docs/main/nn.html#torch.nn.RNNCell to learn about the exact behavior of this module.
See the documentation for
torch::nn::RNNCellOptions
class to learn what constructor arguments are supported for this module.Example:
RNNCell model(RNNCellOptions(20, 10).bias(false).nonlinearity(torch::kReLU));
Public Functions
-
explicit RNNCellImpl(const RNNCellOptions &options_)
Public Members
-
RNNCellOptions options
Protected Functions
-
inline virtual bool _forward_has_default_args() override
The following three functions allow a module with default arguments in its forward method to be used in a Sequential module.
You should NEVER override these functions manually. Instead, you should use the
FORWARD_HAS_DEFAULT_ARGS
macro.
Friends
- friend struct torch::nn::AnyModuleHolder
-
explicit RNNCellImpl(const RNNCellOptions &options_)