Instalação do TensorFlow

Atenção Se você estiver executando isso no seu Jupyter local, usando o Anaconda, é preciso instalar o módulo python do TensorFlow. Saia do Jupyter Notebook e digite na console (dentro do ambiente Anaconda): pip install tensorflow

Depois, rode o Jupyter Notebook novamente e execute este notebook.


In [2]:
install.packages('tensorflow', repos='http://cran.us.r-project.org')


Installing package into ‘/home/nbuser/R’
(as ‘lib’ is unspecified)

In [3]:
library(tensorflow)
install_tensorflow()


Creating virtualenv for TensorFlow at  ~/.virtualenvs/r-tensorflow 
Upgrading pip ...
Upgrading wheel ...
Upgrading setuptools ...
Installing TensorFlow ...

Installation complete.


In [1]:
library(tensorflow)
sess = tf$Session()
hello <- tf$constant('Hello, TensorFlow!')
sess$run(hello)


'Hello, TensorFlow!'

In [ ]: