在 windows 中,在哪里创建 `.theanorc.txt` 文件以及如何让 theano 能够看到它?

In windows, where to create the `.theanorc.txt` file and how to make theano able to see it?

我正在尝试让 thenao 在 windows 上使用 gpu。 This 教程建议我在我的 home 中创建一个 .theanorc 目录并在其中创建一个 theanorc.txt 以便能够在初始化之前设置配置标志。

在哪里创建 theanorc.txt 文件(即如何找到我的家在哪里?)以及如何让 theano 能够看到它? 我已尝试使用以下脚本创建 .theanorc,然后在其中手动添加 theanorc.txt,但未启用 gpu

import os
_theano_base_dir = os.path.expanduser('~')
if not os.access(_theano_base_dir, os.W_OK):
    _theano_base_dir = '/tmp'

_theano_dir = os.path.join(_theano_base_dir, '.theanorc')
if not os.path.exists(_theano_dir):
    os.makedirs(_theano_dir)

theano_config_path = os.path.expanduser(os.path.join(_theano_dir, 'theanorc.txt'))
print (theano_config_path)

这打印了:C:\SPB_Data\.theanorc\theanorc.txt C:\SPB_Data 是我的 home 吗?

在 Windows 中,您的主目录应该是 C:\Users\Your_Windows_UserName。此外,如果您想创建没有 .txt 扩展名的 .theanorc 文件,您可以使用 Notepad++