RNN — PyTorch 1.10.1 documentation
pytorch.org › docs › stableRNN. class torch.nn.RNN(*args, **kwargs) [source] Applies a multi-layer Elman RNN with. tanh . \tanh tanh or. ReLU. \text {ReLU} ReLU non-linearity to an input sequence. For each element in the input sequence, each layer computes the following function: h t = tanh ( W i h x t + b i h + W h h h ( t − 1) + b h h)