rstudio/keras3

keras layer dense problem

Closed this issue · 2 comments

model <- keras_model(
+   sequential() %>%
+     layer(lstm(units = 64, return_sequences = TRUE, input_shape = c(timesteps, features))) %>%
+     layer(lstm(units = 32)) %>%
+     layer(flatten()) %>%
+     layer(dense(units = 1))
+ )
Error in layer(., dense(units = 1)) : could not find function "layer"

Hi again, I got this problemabout keras sequential model, can you help to fix this problem?

Hi, welcome. The example code you provided doesn't look like Keras. Please take a look at https://keras.posit.co/articles/getting_started.html for example usage.

I got it, thank you so much ...