Have you started from a new project completely? Those errors seem to reference r-miniconda
still
I think you need this part at the top, and I was missing a step before:
library(reticulate)
library(keras)
virtualenv_create("myenv")
use_virtualenv("myenv")
install_keras(method="virtualenv", envname="myenv")
use_virtualenv("myenv")
In the portion below, Ming provides a slight tweak of having to use_virtualenv
again after the R session reloads. That seems to have solved the problem for that user
Hi Ziqian_Xia,
I believe I was able to get this to work with the following steps: Starting with a new project using 2GB memory and 1.5 CPU, I used these steps from Sam's workaround:
library(reticulate)
library(keras)
virtualenv_create("myenv")
use_virtualenv("myenv")
install_keras(method="virtualenv", envname="myenv")
Now after you see the message "Restarting R session..." but before you try to use Keras, run use_virtualenv("myenv") a second time. I believe the virtualenv was deactivated when the R session was restarted.
After I ran these steps I was able to do:
library(keras)
mnist <- dataset_mnist()
x_train <- mnist$train$x
y_train <- mnist$train$y
x_test <- mnist$test$x
etc
I was no…
Can you please try in a new project, following the instructions above?
Thanks in advance!
-Joshua C. Forest