"Trainr" function problems

Hello. I am trying to repeat the example of implementing the trainr function from rnn package, shown on: https://cran.r-project.org/web/packages/rnn/rnn.pdf (p.15). I do this example with my own data, which can be found at: https://github.com/Maxim-ml/SP/blob/main/SP500.txt . This data is referred to as data in the text of code.

#Creating training numbers (variables)
#S&P 500

#Create training response numbers (variables)

SP500total<-SP500log_1 + SP500log_2

#Convert to binary

#Create 3d array: dim 1:samples; dim 2:time; dim 3:variables

SP_train_<-array(c(SP500log_1,SP500log_2), dim=c(dim(SP500log_1),2))

#Train the model
  Y = SP500total,
  X = SP_train_,
  learningrate = 0.3,
  #learningrate_decay = 0,
  #momentum = 0,
  hidden_dim = 16,
  network_type = "lstm",
  numepochs = 50,
  #sigmoid = "tanh",
  #use_bias = TRUE,
  #batch_size = 128,
  #seq_to_seq_unsync = FALSE,
  #loss_function = "mse")


However, when I run this code, I see only the red stop sign in the top of the console. The code itselt doesn't compile and I don't receive the result.I've been waiting for an hour already, but it's senseless. But when I run the example from p. 16 - 17 from the cran link above, everything actually goes well and compiles.

Could you, please, tell me, why the process of running the code doesn't come to its end? How is it possible to fix it and finish successfully?

Thank you for your effort.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.