theano

Theano import error: No module named cPickle

匿名 (未验证) 提交于 2019-12-03 02:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: >>> import theano Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/theano/__init__.py", line 52, in <module> from theano.gof import ( File "/Library/Python/2.7/site-packages/theano/gof/__init__.py", line 38, in <module> from theano.gof.cc import \ File "/Library/Python/2.7/site-packages/theano/gof/cc.py", line 30, in <module> from theano.gof import link File "/Library/Python/2.7/site-packages/theano/gof/link.py", line 18, in <module> from theano.gof.type import Type File "/Library

Receive AssertionError while optimizing convolution in theano

匿名 (未验证) 提交于 2019-12-03 02:35:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to run this code: x_set = np.random.rand(100,100,100) x = T.dtensor3('x') inp = x.reshape((100, 1, 100, 100)) W_stdDev = np.sqrt(2. / (3 * 3 * 2)) W = theano.shared( np.asarray( np.random.normal(loc=.0, scale=W_stdDev, size=(3,1,3,3)), dtype=theano.config.floatX ), borrow=True ) conv_out = conv2d( input=inp, filters=W, filter_shape=(3,1,3,3), ) train_model = theano.function( inputs=[x], outputs=conv_out, ) print(train_model(x_set)) but receive the error: AssertionError: AbstractConv2d Theano optimization failed: there is no

theano - print value of TensorVariable

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How can I print the numerical value of a theano TensorVariable? I'm new to theano, so please be patient :) I have a function where I get y as a parameter. Now I want to debug-print the shape of this y to the console. Using print y.shape results in the console output (i was expecting numbers, i.e. (2,4,4) ): Shape.0 Or how can I print the numerical result of for example the following code (this counts how many values in y are bigger than half the maximum): errorCount = T.sum(T.gt(T.abs_(y),T.max(y)/2.0)) errorCount should be a single number

Importing theano: AttributeError: &#039;module&#039; object has no attribute &#039;find_graphviz&#039;

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I run import theano in Python, I get the following error message: Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import theano Traceback (most recent call last): File " ", line 1, in File "/usr/local/lib/python2.7/dist-packages/theano/__init__.py", line 74, in from theano.printing import pprint, pp File "/usr/local/lib/python2.7/dist-packages/theano/printing.py", line 35, in if pd.find_graphviz(): AttributeError: 'module' object has no

Installing Theano on Windows - DLL load failed

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to install Theano on Windwos 8 Have followed these steps. I try to test using: import numpy as np import time import theano print ( 'blas.ldflags=' , theano . config . blas . ldflags ) A = np . random . rand ( 1000 , 10000 ). astype ( theano . config . floatX ) B = np . random . rand ( 10000 , 1000 ). astype ( theano . config . floatX ) np_start = time . time () AB = A . dot ( B ) np_end = time . time () X , Y = theano . tensor . matrices ( 'XY' ) mf = theano . function ([ X , Y ], X . dot ( Y )) t_start = time . time (

how to setup cuDnn with theano on Windows 7 64 bit

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have installed Theano framework and enabled CUDA on my machine, however when I "import theano" in my python console, I got the following message: >>> import theano Using gpu device 0: GeForce GTX 950 (CNMeM is disabled, CuDNN not available) Now that "CuDNN not available", I downloaded cuDnn from Nvidia website. I also updated 'path' in environment, and added 'optimizer_including=cudnn' in '.theanorc.txt' config file. Then, I tried again, but failed, with: >>> import theano Using gpu device 0: GeForce GTX 950 (CNMeM is disabled, CuDNN not

Theano fails due to NumPy Fortran mixup under Ubuntu

匿名 (未验证) 提交于 2019-12-03 01:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I installed Theano on my machine, but the nosetests break with a Numpy/Fortran related error message. For me it looks like Numpy was compiled with a different Fortran version than Theano. I already reinstalled Theano ( sudo pip uninstall theano + sudo pip install --upgrade --no-deps theano ) and Numpy / Scipy ( apt-get install --reinstall python-numpy python-scipy ), but this did not help. What steps would you recommend? Complete error message: ImportError: ('/home/Nick/.theano/compiledir_Linux-2.6.35-31-generic-x86_64-with-Ubuntu-10.10

ImportError: No module named downsample

匿名 (未验证) 提交于 2019-12-03 01:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 选择语言 中文(简体) 日语 英语 中文(繁体) 由 翻译 强力驱动 问题: I am using Theano. The OS is Ubuntu. The Theano is UPTODATE. I am wondering why I am getting by from theano.tensor.signal.downsample import max_pool_2d command. ImportError: No module named downsample . 回答1: The downsample module has been moved to pool , so try declaring it as: from theano . tensor . signal . pool import pool_2d After changing delete your theano cache with the command: theano - cache purge 回答2: update theano and lasagne pip install -- upgrade https : //github.com/Theano/Theano/archive

theano gives “…Waiting for existing lock by unknown process…”

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My code was working fine. However, now I am getting an error that says: Using gpu device 0: GeForce GT 750M WARNING (theano.gof.cmodule): ModuleCache.refresh() Found key without dll in cache, deleting it. /Users/mas/.theano/compiledir_Darwin-14.5.0-x86_64-i386-64bit-i386-2.7.10-64/tmpcm9_P6/key.pkl INFO (theano.gof.compilelock): Waiting for existing lock by unknown process (I am process '2799') INFO (theano.gof.compilelock): To manually release the lock, delete /Users/mas/.theano/compiledir_Darwin-14.5.0-x86_64-i386-64bit-i386-2.7.10-64/lock

convert python ndarray to theano tensor type variable

匿名 (未验证) 提交于 2019-12-03 00:58:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have ndarray like : diag = [] diag.append(np.diag([1,1,0])) diag.append(np.diag([0,1,1])) diag [array([[1, 0, 0], [0, 1, 0], [0, 0, 0]]), array([[0, 0, 0], [0, 1, 0], [0, 0, 1]])] How can I convert it into Theano tensor variable of type float 64, matrix ? As I need to perform dot operation like Theano.dot(diag, X) where X is shared variable of type float 64, matrix. 回答1: Just create a SharedVariable like this diag_ = theano.shared(np.array(diag).astype("float64")) theano.dot(diag_, X) http://deeplearning.net/software/theano/library/compile