# DEFINE THE LSTM MODEL
#input_shape <- c(52.0, 5.0)
#input_shape = c(seq_length, ncol(close_data))
#layer_input(shape = input_shape) %>%
model <- keras_model_sequential() %>%
layer_lstm(units = 50, return_sequences = TRUE,
input_shape = c(52, 5)) %>%
layer_lstm(units = 50) %>%
layer_dense(units = 1)
the code above keeps yielding this error:
Error in py_call_impl(callable, call_args$unnamed, call_args$named) :
ValueError: Only input tensors may be passed as positional arguments. The following argument value should be passed as a keyword argument: <Sequential name=sequential_1, built=False> (of type <class 'keras.src.models.sequential.Sequential'>)
if you notice, I tried to do ‘input_shape’ in multiple different ways, as shown by the comments at the start.
This is my first time working with neural networks and I have no idea whats going wrong. For reference, I want to use a timestep of 52, and I have 5 features. I’ve modified the code in many other ways that yielded way too many errors to put in one post. I’ve also configured, re-configured, re-installed, and completely changed the python environment that I was using. (I started off using a virtual environment with ‘r-reticulate’ and eventually switched to a conda env(with all the right dependencies installed.
ANY guidance would be appreciated.
I put all of the stuff in this section in the section above. sorry its also my first time using stack overflow.