-
Notifications
You must be signed in to change notification settings - Fork 221
ImportError: cannot import name downsample #235
Comments
Related to #234. |
This issue is happening because the latest released version of Lasagne (0.1) still uses downsample from Theano, but the latest released of Theano no longer supports downsample. @zyui @a01200356 If you prefer to use the newest version of Theano, you could alternatively upgrade Lasagne to the development version via |
change from theano.tensor.signal.pool import max_pool_2d |
@dibidave Worked for me, thanks! |
@dibidave It works for me! Thank you! |
@dibidave worked for me, thank you! |
@dibidave ..thanks its work for me.. |
@dibidave It works for me, thank you! |
@dibidave, Thanks..that worked |
Worked for me too, thanks, @dibidave. |
@dibidave Thanks! It worked |
Thank you so much @dibidave It worked . |
Sorry to reask this question again: I installed the theano with version of 1.0.2, but I can not import the downsample module, I saw several posts for the same issue, and I tried to upgrade the version of Lasagne , but it did not work for me. I saw that the question was asked with theano for version of 0.8. So I wonder if anyone has the same issue for the lasted version of theano and has some workaround? Thanks in advance |
|
@dibidave Thanks a lot!!! |
@dibidave that works for me too. Thanks a lot! |
You just need to install Theano & Lasagne again by following commands.
|
`from sknn import ae
import numpy as np
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
x = np.asarray(range(0,16))
nn = ae.AutoEncoder(
layers=[
ae.Layer("Sigmoid", units=4),
ae.Layer("Sigmoid", units=8),
ae.Layer("Sigmoid", units=4)
],
learning_rate=0.02)
nn.fit(x)`
And then comes the arror_Traceback (most recent call last):
File "/Users/zzzyui/Desktop/CSE514A/hw4/ae1.py", line 17, in
learning_rate=0.02)
File "/Library/Python/2.7/site-packages/sknn/nn.py", line 513, in init
self._setup()
File "/Library/Python/2.7/site-packages/sknn/ae.py", line 100, in setup
backend.setup()
File "/Library/Python/2.7/site-packages/sknn/backend/init.py", line 24, in setup
from . import lasagne
File "/Library/Python/2.7/site-packages/sknn/backend/lasagne/init.py", line 5, in
from .mlp import MultiLayerPerceptronBackend
File "/Library/Python/2.7/site-packages/sknn/backend/lasagne/mlp.py", line 25, in
import lasagne.layers
File "/Library/Python/2.7/site-packages/lasagne/init.py", line 19, in
from . import layers
File "/Library/Python/2.7/site-packages/lasagne/layers/init.py", line 7, in
from .pool import *
File "/Library/Python/2.7/site-packages/lasagne/layers/pool.py", line 6, in
from theano.tensor.signal import downsample
ImportError: cannot import name downsample
The text was updated successfully, but these errors were encountered: