如何设置 theano 配置 [英] How to set up theano config

查看:30
本文介绍了如何设置 theano 配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 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:

  1. locate .theanorc - 不返回任何内容
  2. echo $THEANORC - 不返回任何内容
  3. theano.test() - 没问题
  1. locate .theanorc - returns nothing
  2. echo $THEANORC - returns nothing
  3. theano.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 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆