问题描述
我是 Theano 的新手.正在尝试设置配置文件.
I'm new to Theano.Trying to set up a config file.
首先,我注意到我没有 .theanorc 文件:
First of all, I notice that I have no .theanorc file:
locate .theanorc
- 不返回任何内容echo $THEANORC
- 不返回任何内容theano.test()
- 没问题
locate .theanorc
- returns nothingecho $THEANORC
- returns nothingtheano.test()
- passes ok
我猜在安装 theano 时创建了一些默认配置.它在哪里?
I'm guessing some default configuration was created wen i installed theano. Where is it?
推荐答案
Theano 本身不创建任何配置文件,但其所有配置标志都有默认值.如果你想修改默认值,你只需要这样一个文件.
Theano does not create any configuration file by itself, but has default values for all its configuration flags. You only need such a file if you want to modify the default values.
这可以通过在您的主目录中创建一个 .theanorc 文件来完成.例如,如果您希望 floatX 始终为 float32,则可以这样做:
This can be done by creating a .theanorc file in your home directory. For example, if you want floatX to be always float32, you can do this:
echo -e "\n[global]\nfloatX=float32\n" >> ~/.theanorc
在 Linux 和 Mac 下.在windows下,也可以这样做.有关更多详细信息,请参阅此页面:
under Linux and Mac. Under windows, this can also be done. See this page for more details:
http://deeplearning.net/software/theano/library/config.html
这篇关于如何设置 theano 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!