pool_2d() got an unexpected keyword argument 'ws'
See original GitHub issue#The following github code is not consistent with keras 2.0.0. I ran cifar10_cnn.py from examples. It is giving error in calling pool_2d(). Function arguments do not seem to be consistent.
Kindly check this.
curl -sSL https://github.com/fchollet/keras/raw/master/examples/cifar10_cnn.py | python
Using Theano backend.
x_train shape: (50000, 32, 32, 3)
50000 train samples
10000 test samples
/home/abhijeet/miniconda2/lib/python2.7/site-packages/keras/backend/theano_backend.py:1703: UserWarning: [‘filter_dilation’] are now deprecated in tensor.nnet.abstract_conv.conv2d
interface and will be ignored.
filter_dilation=dilation_rate)
Traceback (most recent call last):
File “<stdin>”, line 45, in <module>
File “/home/abhijeet/miniconda2/lib/python2.7/site-packages/keras/models.py”, line 455, in add
output_tensor = layer(self.outputs[0])
File “/home/abhijeet/miniconda2/lib/python2.7/site-packages/keras/engine/topology.py”, line 545, in call
output = self.call(inputs, **kwargs)
File “/home/abhijeet/miniconda2/lib/python2.7/site-packages/keras/layers/pooling.py”, line 154, in call
data_format=self.data_format)
File “/home/abhijeet/miniconda2/lib/python2.7/site-packages/keras/layers/pooling.py”, line 217, in _pooling_function
pool_mode=‘max’)
File “/home/abhijeet/miniconda2/lib/python2.7/site-packages/keras/backend/theano_backend.py”, line 1833, in pool2d
mode=‘max’)
TypeError: pool_2d() got an unexpected keyword argument ‘ws’
Issue Analytics
- State:
- Created 7 years ago
- Comments:11
Updating to the latest version of Theano via
worked for me.
In theano 0.8, I believe the argument is ds. It seems that the code is intended for theano 0.9.