= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
package torch
-
torch.core
-
-
torch.toplevel
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
A Long Short Term Memory (LSTM) recurrent neural network.
val create : Var_store.t -> input_dim:int -> hidden_size:int -> t
create vs ~input_dim ~hidden_size
creates a new RNN with the specified input dimension and hidden size.
step t state input_
applies one step of the RNN on the given input using the specified state. The updated state is returned.
seq t inputs ~is_training
applies multiple steps of the RNN starting from a zero state. The hidden states and the final state are returned. inputs
should have shape batch_size * timesteps * input_dim
, the returned output tensor then has shape batch_size * timesteps * hidden_size
.