【发布时间】:2023-03-11 19:35:01
【问题描述】:
我正在尝试使用 Keras 在 Python 中开发神经网络,在成功安装在我的 Windows 10 Workstation Anaconda3(及其所有库:numpy、scikit-learn、pandas、SciPy 和 matplotlib)上之后,我意识到需要TensorFlow 或 Theano 也是如此。
在我安装 TensorFlow 失败后,我下载并能够安装 Theano,但尝试从 Python 提示符导入它,我收到以下信息:
WARNING: "g ++ not detected! Theano will be unable to execute optimized C implementations (for both CPU and GPU) and will default to Python implementations. Performance will be several degraded. To remove this warning, set Theano flags cxx to an empty string"
希望通过这种方式解决问题,我下载了 C++ Cygwin64 的 GNU 编译器,但没有任何改变!承认这确实是前进的正确方式,我应该如何访问“Theano flags cxx”?
【问题讨论】:
-
您能解释一下您是如何安装 TensorFlow 和 Theano 的吗?
-
关于 TensorFlow 我不记得了。为了安装 Theano,我打开了 CygWin64 终端并写了“pip install Theano”。一切都很好,在过程结束时......
-
在使用 conda/Anaconda 时,一般应该使用
conda install <package>,特别是对于编译了 C++ 库的 Theano 和 TensorFlow 等包。您应该从 Windows 命令提示符而不是 Cygwin 终端运行conda install命令(除非您在 Cygwin 中安装了 Anaconda)。确保在使用 conda 安装之前运行pip uninstall Theano。
标签: python cygwin anaconda theano keras