Skip to content
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

Can't run final version of code #12

Open
mrfuxi opened this issue Dec 23, 2015 · 3 comments
Open

Can't run final version of code #12

mrfuxi opened this issue Dec 23, 2015 · 3 comments

Comments

@mrfuxi
Copy link

mrfuxi commented Dec 23, 2015

Error occur when running final version of code.

python 5_convolutional_net.py

Traceback

Traceback (most recent call last):
  File "5_convolutional_net.py", line 78, in <module>
    noise_l1, noise_l2, noise_l3, noise_l4, noise_py_x = model(X, w, w2, w3, w4, 0.2, 0.5)
  File "5_convolutional_net.py", line 44, in model
    r = conv2d(X, w, border_mode='full')
  File "/home/fuxi/.virtualenvs/deep/local/lib/python2.7/site-packages/theano/tensor/nnet/conv.py", line 151, in conv2d
    return op(input, filters)
  File "/home/fuxi/.virtualenvs/deep/local/lib/python2.7/site-packages/theano/gof/op.py", line 507, in __call__
    node = self.make_node(*inputs, **kwargs)
  File "/home/fuxi/.virtualenvs/deep/local/lib/python2.7/site-packages/theano/tensor/nnet/conv.py", line 628, in make_node
    "inputs(%s), kerns(%s)" % (_inputs.dtype, _kerns.dtype))
NotImplementedError: The image and the kernel must have the same type.inputs(float32), kerns(float64)
@qianguih
Copy link

qianguih commented Feb 3, 2016

This is a data type error. You can change line 68 from X = T.ftensor4() toX = T.dtensor4(). It will then work.

@palsreturn2
Copy link

Also in model function there is no parameter w_o which should have been present.

@kirk86
Copy link

kirk86 commented Jun 10, 2016

even with the changes suggested by @qianguih I can't run the code example for convnet on osx. I also added theano.config.floatX='float64' at the beginning of the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants