簡體   English   中英

在 R 中運行 Keras 順序 model

[英]Running Keras sequential model in R

我正在創建一個神經網絡 model,我想在 R Studio 中運行keras_sequential_model() 我已經使用install_tensorflow()命令安裝了張量流。 但是,當我運行keras_sequential_model()來構建我的 model 時,它會返回一個全局環境,而不是我可以編譯的 model。 我在控制台中打印了以下內容:

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

如何解釋這一點以及我做錯了什么?

老實說,我在 ML 任務中使用了 python,建議您嘗試一下。 至於您的問題,我建議您查看此示例https://tensorflow.rstudio.com/guide/keras/ ,因為逐步說明了如何操作。 此外,嘗試使用 google colab,因為這可能是您的桌面問題,而不是您的代碼。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM