我安装了tensorflow install_keras(tensorflow = "gpu")
的gpu版本后,出现了此错误。该代码在此之前可以工作。
library(keras)
model <- keras_model_sequential()
model %>%
layer_dense(units=3, activation='relu', input_shape=c(3)) %>%
layer_dense(units=1, activation='relu')
py_call_impl(可调用,dots $ args,dots $ keywords)错误: ValueError:使用不是符号张量的输入调用了density_1层。收到的类型:。完整输入:[]。该层的所有输入都应为张量。
我的会话信息:
> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.18.so
locale:
[1] LC_CTYPE=pt_BR.UTF-8 LC_NUMERIC=C LC_TIME=pt_BR.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=pt_BR.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=pt_BR.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=pt_BR.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] keras_2.1.4
loaded via a namespace (and not attached):
[1] compiler_3.4.4 magrittr_1.5 R6_2.2.2 tools_3.4.4 whisker_0.3-2 base64enc_0.1-3 yaml_2.1.18 Rcpp_0.12.16 reticulate_1.5
[10] tensorflow_1.5 zeallot_0.1.0 jsonlite_1.5 tfruns_1.3
有人知道为什么会这样吗?