-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UserWarning: downsample module has been moved #4337
Comments
Le 5 avr. 2016 13:41, "Jos van Roosmalen" notifications@github.com a
Use From Theano.tensor.signal import pool And use the pool_2d() function. Fred
|
Same issue [theano v.0.9.0dev1.dev-2...]; changed
to
Works! |
After this change, you should delete your Theano cache as it can still load On Thu, Aug 11, 2016 at 10:27 PM, Victoria Stuart notifications@github.com
|
Sorry, I know this thread is closed, but for anyone else searching/reading (as I did) ... Delete Theano cache [ https://github.com//issues/3818 ]: You can delete your theano cache with the command
If that does not work do this in python to know the path of the cache and delete this directory:
|
Use newer import see Theano/Theano#4337
What file(s) do I make the suggested edit? from theano.tensor.signal import downsample ... pooled_out = downsample.max_pool_2d( ... ) to from theano.tensor.signal import pool ... pooled_out = pool.pool_2d( ... ) I modified the base.py file using the first line: from theano.tensor.signal import pool but I'm unable to find the pooled_out line. |
Ahh, sorry: I should have mentioned the file! I believe that the file in question (I had to grep to find it) is:
i.e.
which is a file from the Theano tutorial,
with the code linked near the top of that tutorial:
In my downloaded copy of that script (Aug 2016) I have the following edit:
It appears that the online version has been updated, perhaps in response to this Issue/thread, as "downsample.max_pool_2d" no onger appears in that file. I hope that helps! :-) My configuration: Arch Linux x86_64; Intel Core i7-4790 CPU; ... Theano in Python 2.7 virtual environment ... [victoria@victoria ~]$ thee
(theano-env) [victoria@victoria ~]$ which python
(theano-env) [victoria@victoria ~]$ python --version
(theano-env) [victoria@victoria ~]$ P
(theano-env) [victoria@victoria ~]$ |
Thank you Victoria. |
@victoriastuart Hi Victoria, I changed my code according to what you said. But it give me an error as below. I was previously using one version of theano 0.9.0. It worked well. But after I update, it doesn't work. Maybe, should reinstall theano 0.9.0 rc1? runfile('/space/xzhang/git_cnn_conversion/MyLasagneCode_CIFAR10/test_convnet_new.py', wdir='/space/xzhang/git_cnn_conversion/MyLasagneCode_CIFAR10') File "", line 1, in File "/space/xzhang/anaconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile File "/space/xzhang/anaconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile File "/space/xzhang/git_cnn_conversion/MyLasagneCode_CIFAR10/test_convnet_new.py", line 136, in File "/space/xzhang/git_cnn_conversion/MyLasagneCode_CIFAR10/test_convnet_new.py", line 96, in main File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/compile/function.py", line 326, in function File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/compile/pfunc.py", line 486, in pfunc File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/compile/function_module.py", line 1808, in orig_function File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/compile/function_module.py", line 1478, in init File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/gof/opt.py", line 98, in call File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/gof/opt.py", line 87, in optimize File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/gof/opt.py", line 241, in apply File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/gof/opt.py", line 87, in optimize File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/gof/opt.py", line 241, in apply File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/gof/opt.py", line 87, in optimize File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/gpuarray/opt.py", line 382, in apply File "/space/xzhang/anaconda2/lib/python2.7/site-packages/theano/gpuarray/opt.py", line 1347, in local_gpua_error_convop AssertionError: Use the new convolution interface to have GPU convolution working: |
You need to call:
theano.tensor.nnet.conv2d()
instead of theano.tensor.nnet.conv.conv2d()
…On Wed, Apr 5, 2017 at 11:18 PM Victoria Stuart ***@***.***> wrote:
Ahh, sorry: I should have mentioned the file! I believe that the file in
question (I had to grep to find it) is:
***@***.*** theano]$ rg . -e "pooled_out" ## rg: "ripgrep"
convolutional_mlp.py
163: #pooled_out = downsample.max_pool_2d(
164: pooled_out = pool.pool_2d(
174: self.output = T.tanh(pooled_out + self.b.dimshuffle('x', 0, 'x', 'x'))
i.e.
/home/victoria/projects/theano/convolutional_mlp.py
which is a file from the Theano tutorial,
http://deeplearning.net/tutorial/lenet.html
with the code linked near the top of that tutorial:
http://deeplearning.net/tutorial/code/convolutional_mlp.py
In my downloaded copy of that script (Aug 2016) I have the following edit:
...
# downsample each feature map individually, using maxpooling
#pooled_out = downsample.max_pool_2d(
pooled_out = pool.pool_2d(
input=conv_out,
ds=poolsize,
ignore_border=True
)
...
It appears that the online version has been updated, perhaps in response
to this Issue/thread, as "downsample.max_pool_2d" no onger appears in that
file.
I hope that helps! :-)
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#4337 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AALC-14NE-pnASisKa-00ZpKa1xUD6vlks5rtFmUgaJpZM4IAd1e>
.
|
@nouiz I see. Thank you. I fixed that problem. But it comes up with a new error saying: ERROR (theano.gpuarray): Could not initialize pygpu, support disabled |
I get this problem when using
Using:
So I have solved in this way:
|
I have reported it here. |
worked for me! |
As on the report, he was using a too old Lasagne for the Theano version he
was using.
…On Fri, Aug 18, 2017 at 9:56 PM Philippe Rémy ***@***.***> wrote:
From Theano.tensor.signal import pool
And use the pool_2d() function.
worked for me!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4337 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AALC-_LSUo7YlGX3vmYLBTPmzP4hXotMks5sZkDkgaJpZM4IAd1e>
.
|
@nouiz yes same thing happened to me. It was due to Lasagne. |
If i do
I get
is it because of my python version ? (3.5) |
This is because your Theano version is too recent compared to your Lasagne version. Can you update Lasagne to the dev version on github? The one obtained with pip install lasagne is old. |
Hi,
I just upgraded from Theano 0.7 to 0.8, When I use:
from theano.tensor.signal import downsample
I get:
/usr/local/lib/python3.4/dist-packages/theano/tensor/signal/downsample.py:6: UserWarning: downsample module has been moved to the theano.tensor.signal.pool module. "downsample module has been moved to the theano.tensor.signal.pool module.")
But if I use:
from theano.tensor.signal.pool import downsample
I get:
ImportError: cannot import name 'downsample'
How to fix this or is this a bug?
Thanks,
Jos
The text was updated successfully, but these errors were encountered: