【问题标题】:configuring theano in windows ? ' where to put the .theanorc.txt在 Windows 中配置 theano ? ' 将 .theanorc.txt 放在哪里
【发布时间】:2026-02-09 09:05:02
【问题描述】:

我已按照此安装教程进行操作: http://deeplearning.net/software/theano/install_windows.html#install-windows

如教程中所述,我已将.theanorc.txt 文件放入:

c:\scisoft\WinPython-64bit-2.7.9.4\settings

我能够从 env.bat 创建的 shell 运行测试程序,并看到它使用 GPU。

现在我想从pycharm开发而不是“cmd”,但是有get:

WARNING (theano.configdefaults): 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 severely degraded. 
To remove this warning, set Theano flags cxx to an empty string.

我假设是因为他找不到 .theanorc.txt

所以我找到了这个教程: http://deeplearning.net/software/theano/library/config.html

他说把文件放在$HOME,但我没有这样的环境变量。 我尝试添加它,但没有帮助。

有什么想法吗?我在堆栈溢出中提出了数十个有关它的问题,但找不到答案

【问题讨论】:

    标签: python theano deep-learning keras


    【解决方案1】:

    我最近自己做了这个......几乎完全一样的情况!

    如果您运行外部 IDE(即不是 WinPython/Spyder),则需要将 .theanorc 放入您的 Windows 用户文件夹中。

    例如:C:\Users[你的名字]\

    注意,我还建议使用文件名 .theanorc 而不是 .theanorc.txt。我读到这两种方法都有效,但我似乎记得其中只有一种为我工作。

    【讨论】: