我正在尝试由keras在R(rstudio)中编写一个简单的LTSM模型,我想出了以下代码
scores <- model %>% evaluate(
x_test, y_test,
batch_size = batch_size
)
cat('Test score:', scores[[1]])
cat('Test accuracy', scores[[2]])
但是实际上,它在模型%>%fit上失败,并提示我:
Error in py_call_impl(callable, dots$args, dots$keywords) :
ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 1 array(s), but instead got the following list of 3 arrays: [array([[1.],
[2.],
[3.],
[4.],
[5.]], dtype=float32), array([[10.],
[20.],
[30.],
[40.],
[50.]], dtype=float32), array([[100.],
[200.],
...
我正在尝试编写一个能够预测3个输出时间序列数据的LTSM。