简体   繁体   中英

Running Keras sequential model in R

I am creating a neural network model, and I want to run the keras_sequential_model() in R Studio. I have installed tensor flow with the install_tensorflow() command. However, when I run the keras_sequential_model() to build my model, it returns a global environment rather than a model which I can then compile. I get the following printed in my console:

2021-06-02 10:26:06.287327: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-06-02 10:26:06.291491: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found
2021-06-02 10:26:06.292624: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303)
2021-06-02 10:26:06.293598: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: iFeanyiPC
2021-06-02 10:26:06.294593: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: iFeanyiPC
2021-06-02 10:26:06.298435: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-06-02 10:26:06.302191: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set

How to interpret this and what I am not doing right?

To be honest I used python in ML tasks and I suggest you to give a try. As for your problem I reccommend you to look into this example https://tensorflow.rstudio.com/guide/keras/ , because explains step by step how to do it. Moreover, try to use google colab, because maybe it's a problem of your desctop and not your code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM