python theano 由于以下原因优化失败:local_dot_to_dot22 [英] python theano Optimization failure due to: local_dot_to_dot22

查看:48
本文介绍了python theano 由于以下原因优化失败:local_dot_to_dot22的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是 pip 安装了 theano 并尝试运行 theano.test().它产生了很长的错误日志,我复制了第一部分.我还尝试了其他几个例子 - 我见过

I just pip installed theano and tried to run theano.test(). It produced a very long log of errors and I copied the first part. I also tried a couple other examples - I have seen

"local_dot_to_dot22" 

 "ValueError: invalid token "Files\Enthought\Canopy\App\appdata\canopy1.5.2.2785.win-x86_64\Scripts" in ldflags_str: "-LC:\Program Files\Enthought\Canopy\App\appdata\canopy-1.5.2.2785.win-x86_64\Scripts -lmk2_core -lmk2_intel_thread -lmk2_rt" 

好几次了.

我使用的是 python 2.7 (canopy)、scipy 0.15.1-2 和 numpy 1.9.2-1.我对 theano 很陌生.如果您能指出我正确的方向,我将不胜感激.谢谢!

I'm using python 2.7 (canopy), scipy 0.15.1-2 and numpy 1.9.2-1. I am very new to theano. I appreciate if you can point me to the right direction. Thanks!

EEEEEERROR (theano.gof.opt): Optimization failure due to: local_dot_to_dot22
ERROR:theano.gof.opt:Optimization failure due to: local_dot_to_dot22
ERROR (theano.gof.opt): TRACEBACK:
ERROR:theano.gof.opt:TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "c:\theano\theano\gof\opt.py", line 1737, in process_node
replacements = lopt.transform(node)
File "c:\theano\theano\tensor\blas.py", line 1776, in local_dot_to_dot22
return [_dot22(x.dimshuffle('x', 0), y).dimshuffle(1)]
File "c:\theano\theano\gof\op.py", line 647, in __call__
no_recycling=[])
File "c:\theano\theano\gof\op.py", line 918, in make_thunk
no_recycling)
File "c:\theano\theano\gof\op.py", line 836, in make_c_thunk
output_storage=node_output_storage)
File "c:\theano\theano\gof\cc.py", line 1175, in make_thunk
keep_lock=keep_lock)
File "c:\theano\theano\gof\cc.py", line 1113, in __compile__
keep_lock=keep_lock)
File "c:\theano\theano\gof\cc.py", line 1541, in cthunk_factory
key = self.cmodule_key()
File "c:\theano\theano\gof\cc.py", line 1257, in cmodule_key
compile_args=self.compile_args(),
File "c:\theano\theano\gof\cc.py", line 936, in compile_args
ret += x.c_compile_args()
File "c:\theano\theano\tensor\blas.py", line 652, in c_compile_args
return ldflags(libs=False, flags=True)
File "c:\theano\theano\tensor\blas.py", line 537, in ldflags
include_dir=include_dir)
File "c:\theano\theano\gof\utils.py", line 182, in rval
val = f(*args, **kwargs)
File "c:\theano\theano\tensor\blas.py", line 597, in _ldflags
% (t, ldflags_str))
ValueError: invalid token "Files\Enthought\Canopy\App\appdata\canopy-    1.5.2.2785.win-x86_64\Scripts" in ldflags_str: "-LC:\Program Files\Enthought\Canopy\App\appdata\canopy-1.5.2.2785.win-x86_64\Scripts -lmk2_core -lmk2_intel_thread -lmk2_rt"

推荐答案

这里的问题是你的路径中有空格导致的问题,即 Canopy 安装在 C:\Program Files\Enthought\Canopy 但是 Theano 脚本不能很好地处理 ProgramFiles 之间的空间.尝试卸载 Canopy 并在路径中没有空格的目录中重新安装.

The problem here is problem caused by having spaces in your path, i.e. Canopy is installed in C:\Program Files\Enthought\Canopy but the Theano scripts don't work well with the space between Program and Files. Try uninstalling Canopy and reinstall in a directory with no space in the path.

您还应该遵循有关在 Windows 上安装 Theano 的其他说明.不幸的是,这并不像 pip install theano 那样简单.

You should also follow the other instructions for installing Theano on Windows. Unfortunately it's not as simple as just pip install theano.

这篇关于python theano 由于以下原因优化失败:local_dot_to_dot22的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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