在R中使用keras_model_sequential()时出错

时间:2018-01-16 11:58:05

标签: r keras

根据Error in keras_model_sequential for R提出的类似问题,创建了此新帖子。那边没有答案。

以下是我收到的错误

    Error in .Call(_reticulate_py_initialize, python, libpython, pythonhome, : Incorrect number of arguments (7), expecting 8 for _reticulate_py_initialize'

从我得到的错误和上面帖子中提到的错误可以看出,错误非常相似,但相反。以下是一些可能有助于解决此错误的其他细节:

R version 3.4.1 (2017-06-30)
keras_2.1.2.9001
tensorflow_1.4.3.9000
reticulate_1.4

以下是我使用的代码:

    model = keras_model_sequential() %>%
    layer_dense(units = 144,  input_shape = c(13170)) %>%
    layer_activation(activation = 'relu') %>%
    layer_batch_normalization()  %>%
    layer_dropout(rate = 0.1) %>%
    layer_dense(units = 144) %>%
    layer_activation(activation = 'relu') %>%
    layer_batch_normalization()  %>%
    layer_dropout(rate = 0.1) %>%
    layer_dense(units = 2) %>%
    layer_activation(activation = 'sigmoid')

以上代码是否不足以创建模型?提前谢谢!

0 个答案:

没有答案