Thanks for helping me. I use windows 7 and want to use pymc3 in python3.7,
但这不管用,我也不知道。我应该安装其他软件包还是有任何解决方案?我已经试过了我在网上看到的一切。我不知道为什么我不能发布这个question????????????????????????????????????????????????????????????????????????????????????????????????????????????
ImportError Tra
我正在尝试让它们在windows上使用gpu。教程建议我在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符号函数时,我得到了一个OSError和回溯。有趣的是,相同的代码可以在不同的机器上运行。一台机器配置为使用GPU,而另一台(出现错误)仅使用CPU。还有没有其他人经历过这种行为,并知道如何继续下去?
File "classifiers/mlp.py", line 37, in predict
f = theano.function([X], Y)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/compile/function.py&
在Windows 10下,在成功安装tensorflow gpu,和keras gpu之后,我使用以下方法安装了theano gpu:
conda install theano pygpu
一切仍然很好,tensorflow gpu, keras gpu等等。我在theano中运行了简单的示例,并在jupyter中执行了行,
import numpy
import theano.tensor as T
from theano import function
它提出了一个警告:
WARNING (theano.configdefaults): g++ not available, if usin
抱歉,如果这是琐碎的,因为我碰巧是新的这些东西。我将theano设置为使用我的gpu在ubuntu可信的tahr上进行计算。我有AMD Radeon HD 7670M gpu。当我尝试使用gpu运行测试脚本来检查theano的功能时,我得到了以下错误:
Mapped name None to device opencl0:0: Turks
Traceback (most recent call last):
File "test.py", line 11, in <module>
f = function([], T.exp(x))
File
我有下面的代码,它将2个矩阵堆叠成一个3D张量。
import theano
import theano.tensor as T
A = T.matrix("A")
B = theano.tensor.stack(A, A)
f = theano.function(inputs=[A], outputs=B)
print f([range(10)]*2)
但是,我不知道需要提前堆叠矩阵多少次。例如,第四行代码可能是:
B = theano.tensor.stack(A, A, A)
B = theano.tensor.stack(A, A, A, A)
etc...
是否有一个
我正在尝试在CPU机器上安装Theano (运行英特尔高清显卡,没有NVIDIA)。在python中测试时,我得到了以下导入错误。
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to exe
cute optimized C-implementations (for both CPU and GPU) and will default to Pyth
on implementations. Performance will be severely degraded. To remove thi
假设我有一个theano函数:
def my_fun(x, y):
# Create output array for example sake
z = np.asarray(
shape=(x.shape[0], y.shape[1]),
dtype=theano.config.floatX
)
z = x + y
# this is wrong, how should I convert this to a theano
# tensor?
return z
x = theano.tensor.dmatrix("x")
y
我使用keras和theano作为后端,在windows10上构建一个神经网络,我的python版本是2.7。问题是,当我尝试使用keras时,我总是得到一个路径错误。
$python
>>import keras
给了我这个错误
Problem occurred during compilation with the command line below:
"g++" -shared -g -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -I"C:\Python27\lib\site-
据我所知,python模块永远不会导入两次,也就是说,模块中的代码只会在第一次导入时执行。后续的导入语句只是将模块添加到导入的作用域中。
我有一个名为"TiledConvC3D.py“的模块,它似乎被多次导入。我使用pdb打印此模块代码顶部的堆栈。
下面是第一次执行模块时堆栈跟踪的结尾:
File "<anonymized>/python_modules/Theano/theano/gof/cmodule.py", line 328, in refresh
key = cPickle.load(open(key_pkl, 'rb'))
F
我正在尝试在Windows7上使用Theano,我可以安装Theano并导入Theano,但在看到没有安装C编译器的警告后,我也安装了mingw。现在,当我尝试"import theano“时,我得到了一个编译错误。这条消息相当长,但相关部分(据我所知)如下所示:
Problem occurred during compilation with the command line below:
g++ -shared -g -D NPY_ARRAY_ENSURECOPY=NPY_ENSURECOPY -D NPY_ARRAY_ALIGNED=NPY_ALIGNED -D NPY_ARRA