你好,我今天正在用R语言研究tensorflow。图书馆(tensorflow)

你好,我今天正在用R语言研究tensorflow。图书馆(tensorflow),r,tensorflow,R,Tensorflow,我今天用R语言在tensorflow上工作 但我在安装tensorflow软件包后键入了这些代码行: library(tensorflow) sess = tf$Session() hello <- tf$constant("Hello, TensorFlow!") 库(tensorflow) sess=tf$Session() 您好加载tensorflow后,我们需要使用安装\u tensorflow devtools::install_github("rstudio/tensorfl

我今天用R语言在tensorflow上工作

但我在安装tensorflow软件包后键入了这些代码行:

library(tensorflow)
sess = tf$Session()
hello <- tf$constant("Hello, TensorFlow!")
库(tensorflow)
sess=tf$Session()

您好加载
tensorflow
后,我们需要使用
安装\u tensorflow

devtools::install_github("rstudio/tensorflow")
library(tensorflow)
install_tensorflow()
#Using r-tensorflow conda environment for TensorFlow installation
##Determining latest release of TensorFlow...done
#Installing TensorFlow...
#---
#---
#---
#[freetype            ]|#####################################             |  75%
#[h5py                ]|########################################          |  81%
#[scipy               ]|###########################################       |  87%
#[pillow              ]|##############################################    |  93%
#[      COMPLETE      ]|##################################################| 100% 
#Installation of TensorFlow complete.
然后启动
会话

sess = tf$Session()
hello <- tf$constant('Hello, TensorFlow!')
sess$run(hello)
#b'Hello, TensorFlow!'
sess=tf$Session()

您好您好,我有一个变通方法

将代码保存到R脚本文件中,比如abc.R

从RStudio打开shell并执行“R CMD BATCH abc.R”


或者RStudio上的系统(“R CMD BATCH abc.R”)

是否安装了python
tensorflow
库?我从hello行收到了相同的错误消息
sess = tf$Session()
hello <- tf$constant('Hello, TensorFlow!')
sess$run(hello)
#b'Hello, TensorFlow!'