我正在使用Theano。操作系统是Ubuntu。Theano已经是最新版本。我想知道为什么我会在执行from theano.tensor.signal.downsample import max_pool_2d
命令时出现以下错误:
ImportError: No module named downsample
。
更新Theano和Lasagne
pip install --upgrade https://github.com/Theano/Theano/archive/master.zip
pip install --upgrade https://github.com/Lasagne/Lasagne/archive/master.zip
downsample
模块已移动到 pool
中,请尝试声明为:
from theano.tensor.signal.pool import pool_2d
在更改后,请使用以下命令删除您的Theano缓存:
theano-cache purge
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 中
theano-cache purge File "<stdin>", line 1 theano-cache purge ^ SyntaxError: invalid syntax
- Amn Khsudo pip install --upgrade --no-deps theano
。 - l'L'l