RNN package and problems with "Predictr" I have two questions about how to use R's RNN package, specifically the trainr and predictr functions.

Let's suppose I have a time series of 4000 steps for 5 different variables.


How should this be passed on to the RNN, since the input has to be a 3D array? Should it be an array of dim(1, 4000, 5) or dim(4000,1,5) or something completely different?


Moreover, let's suppose I successfully train my RNN and would like to make some predictions using the predictr function.


Which dimension will the output have and how can it be interpreted?


Until now I have tried to input the data as 3D array (4000, 1, 5) with the following code:

RecNN &lt;- trainr(TrainR, TrainI, 
  learningrate = 0.003, momentum = 0.003, hidden_dim = c(100),
  network_type = "rnn", batch_size = 50,
  numepochs = 100, sigmoid = "logistic", use_bias = TRUE)

print("--- DONE LEARNING ---")


And then used the predictr function with the input (250, 1, 5):

results1 &lt;- predictr(RecNN, TestI, hidden = TRUE, real_output = TRUE)

List of 2
 $ : num [1:250, 1, 1:100] 0 0 0 0 0 0 0 0 0 0 ...
 $ : num [1:250, 1, 1:2] 1 1 1 1 1 1 1 1 1 1 ...


Thanks a lot!
The manual gives needed dimensions (see help on trainr function): 

Dimensions of input X need to be as: 

dim 1: samples
dim 2: time
dim 3: variables 


and dimensions of output Y should be: 

dim 1: samples (must be equal to dim 1 of X)
dim 2: time (must be equal to dim 2 of X)
dim 3: variables (could be 1 or more, if a matrix, will be coerce to array)