在windows中,在何处创建“.theanoc.txt”文件以及如何使theano能够看到它?

在windows中,在何处创建“.theanoc.txt”文件以及如何使theano能够看到它?,windows,theano,Windows,Theano,我正在尝试使Noo在windows上使用gpu。本教程建议我在我的主页上创建一个.theanoc目录,并在其内部创建一个theanoc.txt,以便在初始化之前设置配置标志 在哪里创建theanoc.txt文件(即,如何找到我家在哪里?)以及如何使theano能够看到它? 我尝试了以下脚本来创建.theanoc,然后在其中手动添加了theanoc.txt,但未启用gpu: import os _theano_base_dir = os.path.expanduser('~') if not os

我正在尝试使Noo在windows上使用gpu。本教程建议我在我的
主页上创建一个
.theanoc
目录,并在其内部创建一个
theanoc.txt
,以便在初始化之前设置配置标志

在哪里创建
theanoc.txt
文件(即,如何找到我家在哪里?)以及如何使theano能够看到它? 我尝试了以下脚本来创建
.theanoc
,然后在其中手动添加了
theanoc.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\u Data\.theanoc\theanoc.txt
C:\SPB\u Data
my
home

在Windows中,您的主目录应该是
C:\Users\your\u Windows\u UserName
。另外,如果要创建
.theanoc
文件,而不使用
.txt
扩展名,也可以使用