Leon
June 25, 2020, 12:24pm
1
Running the following setup script, which has worked before, but alas no longer...
The installation seems succesful, but when trying to fetch the mnist
dataset, I simply get the error:
> mnist <- dataset_mnist()
Error:
Setup:
# Install packages --------------------------------------------------------
install.packages("tidyverse")
install.packages("devtools")
# Load libraries ----------------------------------------------------------
library("tidyverse")
library("devtools")
# Install keras / tensorflow ----------------------------------------------
install_github("rstudio/keras")
# Would you like to install miniconda? Y
library(keras)
install_keras(tensorflow = "1.13.1")
# Test installation -------------------------------------------------------
library("keras")
mnist <- dataset_mnist()
print(head(mnist))
# Clean up ----------------------------------------------------------------
rm(mnist)
Leon
June 25, 2020, 1:21pm
2
Googling back and forth, I have now arrived at this setup, which works.
install.packages("remotes")
remotes::install_github("rstudio/tensorflow")
install.packages("reticulate")
library(tensorflow)
install_tensorflow(version = "2.0.0b1", method = "virtualenv", envname = "r-reticulate")
install.packages("keras")
library(keras)
The difference is not entirely clear to me though...
We don't recommend using install_keras(tensorflow = "1.13.1")
anymore. Instead, in rstudio.cloud use:
install.packages("keras")
keras::install_keras(tensorflow = "cpu")
However, please notice that tools like TensorFlow and Keras are not likely to run in the free version since it comes with 1GB of memory which is not sufficient to start these packages at the moment.
Leon
Closed
July 16, 2020, 3:27pm
4
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.