ImportError: No module named downsample

2019-03-21 03:31发布

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.

4条回答
我想做一个坏孩纸
2楼-- · 2019-03-21 04:05

Try to update the Theano using this link.

pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip
查看更多
贪生不怕死
3楼-- · 2019-03-21 04:06

Same issue [theano v.0.9.0dev1.dev-2...]; changed

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

to

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

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

查看更多
家丑人穷心不美
4楼-- · 2019-03-21 04:21

update theano and lasagne

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

Lasagne vs Theano possible version mismatch (Windows)

查看更多
欢心
5楼-- · 2019-03-21 04:24

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
查看更多
登录 后发表回答