opened
bcarpenter-pub
username_0
It appears as the upscore layer is intended to upscore a feature map.  Similiar to how the Deconv and Bilinear keral works in Caffe.

http://caffe.berkeleyvision.org/doxygen/classcaffe_1_1BilinearFiller.html

Their implementation mentions that the usage of Deconv (i.e. conv2d_transpose + bilinear kernel) should be the same as performing the following on an input image

```
import skimage.transform
plt.imshow(skimage.transform.rescale(image[:,:,0], 2, mode='constant', cval=0))
```

If the upscore implementation is intended to behave in a similar way, it does not.  Passing an image through this layer to upsample to twice the size results in noise.

The reason for this is that for an input with C_i channels, output with C_o channels, and stride of S, the layer creates a kernel of size [S,S,C_i,C_o]

This successfully works with tensorflows conv2d_transpose function, however as a result the kernal does not bi-linear filter each channel of the input to create an output, instead it sums over all channels of the input to create one of the output channels.   

In order to make this layer work properly, the input object should be unpacked along the channels dimension.  Each channel should be conv2d_transposed with a kernel of size [S,S,1, 1] and then the resulting maps should be packed back into an output of size [B H W C_o]

** Note **

This is not a very elegant solution due to the unpacking and packing, but it is unclear how to get this functionality out of the tf.conv2d_transpose function.
Upscore implementation may not perform as intended.
issue
created
bcarpenter-pub
username_0
actually, i realize I am wrong.  The current implementation is correct as it is being used with the tensorflow conv2d_transpose which does a convolution across all channels.  The current creation of the filiter accounts for this as to only enable per channel upsampling.  Good job all! :D
comment
closed
bcarpenter-pub
username_0
issue