|
When I wanna construct a large convolutional neural network using theano, conv.conv2d gives me a lot trouble. In most CNN architecture, current layer conv-kernels don't moves on all feature maps in previous layer. But conv.conv2d imposes input feature map's number must equal the kernel's number. Some solutions in theano? In fact, the sparsity of kernel's linking with previous feature maps decreases the arch's scale, benefits training. |
most convnets I've seen do actually have filters that are connected to all feature maps from the previous layer. If you don't want this, you'll just have to slice the input to conv.conv2d manually I think. I suspect this will degrade performance significantly. Another option is to write an op for it, but that takes a bit more work.
Alternatively you can look at cuda-convnet, which supports sparse convolutional layers out of the box: http://code.google.com/p/cuda-convnet/wiki/LayerParams