I've been trying to implement fully convolutional networks (fcn8s), however I had some difficulty in thecrop layer after deconvolution. I tried to use SliceLayer to perform center, upper or lowerslicing of each axis (width and height), and the results were not satisfactory.
After checking the source of Caffe as here, the crop layer takes two bottom layers (input andconvolution or deconvolution) and outputs a single layer that matches the output shape of input. In addition, it performs differently for convolution and deconvolution based on their parameters, e.g.,kernel size, stride and pad.
Can anyone give some suggestions on how to implement this in Lasagne/Theano? Many thanks in advance.
This was originally posted in https://github.com/Lasagne/Lasagne/issues/660.
It seems for `deconvolution`, the `crop` layer perform upscaling by a factor determined by `stride` and shift the coordinates by a `offset=(kernel_size-1)/2-pad`.
My question now is if I can pass a `slice` that are not successive (i.e. [0, 4, 8, 12, ...]) to the `SliceLayer`
That's definitely good know, but is it possible to take a step further and pass a random set of indices (e.g. [1, 2, 7, 20, 50, ...]) to "slice"?
But why would you need to extract a nonregular set of indices?
I did that in order to implement fractional pooling.