Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named downsample

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.

like image 903
Amn Kh Avatar asked Sep 14 '16 23:09

Amn Kh


2 Answers

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)

like image 182
Zhu Xiaohu Avatar answered Nov 01 '22 18:11

Zhu Xiaohu


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
like image 32
l'L'l Avatar answered Nov 01 '22 17:11

l'L'l