要将TensorFlow
与R一起使用,请按照此处给出的步骤进行操作:https://github.com/rstudio/tensorflow
当我尝试运行以下代码时:
sess = tf$Session()
hello <- tf$constant('Hello, TensorFlow!')
sess$run(hello)
我收到错误,如下所示:
> sess = tf$Session()
Error: attempt to apply non-function
> hello <- tf$constant('Hello, TensorFlow!')
Error: attempt to apply non-function
> sess$run(hello)
Error: attempt to apply non-function
这可能是什么原因?安装TensorFlow for R
时没有错误