Closed gnuchoi closed 9 years ago
Upgrade Theano to its latest version.
I had the same issue with Theano 0.7 version. I added: import theano.tensor.signal.conv from theano.tensor.signal import downsample to convolutional.py and it solved the problem.
@michael-ermolenko It solved my problem, thanks.
I had the same two problems after I installed keras by cloning. sudo pip install keras --upgrade solves the "TypeError: max_pool_2d() got an unexpected keyword argument 'st'" problem and @michael-ermolenko 's answer solves the "AttributeError: 'module' object has no attribute 'signal'" problem. Maybe making a PR with this solution would help?
+1 for PR with @michael-ermolenko 's solution
+2 for PR with @michael-ermolenko's solution - worked like a charm.
@michael-ermolenko <-- your solution solved the problem. :)
Now I'm working on two machines; one iMac and the other on linux server.
iMac: MacOsX, python 2.7.6. theano 0.7.0, keras installed with
sudo pip
. server: python 2.7.10 Anaconda, theano 0.6.0, keras was cloned with local folder withsys.path.append('')
, then I tested after install it bypython setup.py install --user
.Symptoms: keras throws an error for my code, cifar10_cnn and mnist_cnn examples while all of them works well on my iMac.
---before re-install---
File "/home1/irteam/users/keunwoo/learning_audio.py", line 55, in buildConvNetModel model.compile(loss='categorical_crossentropy', optimizer=sgd) File "build/bdist.linux-x86_64/egg/keras/models.py", line 287, in compile File "build/bdist.linux-x86_64/egg/keras/layers/containers.py", line 51, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 223, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 356, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 198, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 356, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 198, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 356, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 277, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 198, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/convolutional.py", line 167, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 198, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/convolutional.py", line 210, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/convolutional.py", line 167, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 198, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/convolutional.py", line 210, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/convolutional.py", line 167, in get_output File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input File "build/bdist.linux-x86_64/egg/keras/layers/convolutional.py", line 211, in get_output TypeError: max_pool_2d() got an unexpected keyword argument 'st'
---now--- File "mnist_cnn.py", line 59, in
model.compile(loss='categorical_crossentropy', optimizer='adadelta')
File "build/bdist.linux-x86_64/egg/keras/models.py", line 351, in compile
File "build/bdist.linux-x86_64/egg/keras/layers/containers.py", line 53, in get_output
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 257, in get_output
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 392, in get_output
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 232, in get_output
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 257, in get_output
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 392, in get_output
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 313, in get_output
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 232, in get_output
File "build/bdist.linux-x86_64/egg/keras/layers/core.py", line 31, in get_input
File "build/bdist.linux-x86_64/egg/keras/layers/convolutional.py", line 210, in get_output
AttributeError: 'module' object has no attribute 'signal'
The messages are the same for all three codes. It could be problem on the way I installed keras, theano version, or even python version, or something else that I can't imagine. Sadly I'm not allowed to use sudo on the server, now I'm going to try on virtualenv. I'd appreciate any comments!