繁体   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