ImportError: No module named downsample

ImportError: No module named downsample

我正在使用 Theano。 OS 是 Ubuntu。 Theano 已更新。我想知道为什么我要通过 from theano.tensor.signal.downsample import max_pool_2d 命令。

ImportError: No module named downsample.

downsample 模块已移至 pool,因此请尝试将其声明为:

from theano.tensor.signal.pool import pool_2d

更改后使用以下命令删除您的 theano 缓存:

theano-cache purge

尝试使用此更新 Theano link。

pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip

更新 Theano 和千层面

pip install --upgrade https://github.com/Theano/Theano/archive/master.zip
pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip

同样的问题[theano v.0.9.0dev1.dev-2...];改变了

from theano.tensor.signal import downsample
pooled_out = downsample.max_pool_2d( ... )

from theano.tensor.signal import pool
pooled_out = pool.pool_2d( ... )

在/lib/python2.7/site-packages/lasagne/layers/pool.py