i tried to use conv3d2d for making 3d CNN. I get error below(my code is at enter link description here):
Traceback (most recent call last):
File "/home/shome/workspace_temp/conv3d_test/conv3d_test.py", line 1, in from convnet3d import ConvLayer
File "/home/shome/softwares/theano/Theano-3D-ConvNet-master/convnet3d/convnet3d.py", line 12, in from conv3d2d import conv3d
File "/home/shome/softwares/theano/Theano-3D-ConvNet-master/convnet3d/conv3d2d.py", line 298, in make_gpu_optimizer(DiagonalSubtensor, [0])
File "/home/shome/softwares/theano/Theano-3D-ConvNet-master/convnet3d/conv3d2d.py", line 266, in make_gpu_optimizer @theano.gof.local_optimizer([])
File "/usr/local/lib/python2.7/dist-packages/theano/gof/opt.py", line 948, in decorator raise ValueError,
("Use None instead of an empty list to apply to all nodes.",
f.__module__, f.__name__)
ValueError: ('Use None instead of an empty list to apply to all nodes.', 'conv3d2d', 'local_to_gpu').
My CNN construction is as below:
layer_0_input=x.reshape(batch_size,1,28,28,28)
**layer0=ConvLayer(layer_0_input, 1, nkerns[0], (5,5,5), (28,28,28), 100, T.tanh )**
layer1=PoolLayer(layer0.output, (2,2,2))
**layer2=ConvLayer(layer1.output, nkerns[0], nkerns[1], (5,5,5), (12,12,12), 100, T.tanh)**
layer3=PoolLayer(layer2.output, (2,2,2))
layer4_input=layer3.output.flatten(2)
layer4=HiddenLayer(layer4_input, nkerns[1]*4*4*4, 500, T.tanh)
layer5=LogRegr(layer4.output, 500, 10, rng1)
I think the error is in instantiating the Convlayer. Can anyone help?
Your conv3d2d.py
files seems to have been copied from an earlier version of Theano, and the syntax for @theano.gof.local_optimizer
has changed since.
If you look at the updated version in the latest master, the call to the decorator has been changed from @theano.gof.local_optimizer([])
to @theano.gof.local_optimizer([op, cuda.gpu_from_host])
.
Applying that change alone may not be enough, though, so you may be better off importing conv3d2d
from Theano rather than your repository, or updating the whole file.