MarvinTeichmann / tensorflow-fcn

An Implementation of Fully Convolutional Networks in Tensorflow.
MIT License
1.1k stars 433 forks source link

A problem about the deconvolution #46

Open GZHermit opened 6 years ago

GZHermit commented 6 years ago

Hi Marvin,thanks for your brilliant code.I have learned a lot of things. But I have a question about the implementation of the deconvolution. First,it seem that the input channel has to be equal to output.I wanna know why you don‘t use the tf.image.resize_bilinear().I have read the offical code by Caffe, the learning rate of their deconvolution layer is zero. Second,I can not understand how you define the deconvolution filters(as to the way you construct the function:get_deconv_filter).Can you tell me your thoughts or give me some papers or blogs i can refer to ? Hope for your reply.Thanks @MarvinTeichmann

Oyejileo commented 6 years ago

I have the same problem,0.0

MarvinTeichmann commented 6 years ago

I wanna know why you don‘t use the tf.image.resize_bilinear().

tf.image.resize_bilinear() is not trainable. In the original version of the FCN paper they used to train the deconvolution layer. They have stopped this, because it does not make a big difference. I have also experimented with tf.image.resize_bilinear(). If you set "trainable=False" (for the deconvolution weights) tf.image.resize_bilinear() yields the exact same result as my deconvolution layer. The speed is also exactly the same.

So short ansswer: Currently the deconvolution weights are trained as of default. If you don't want to train them, you can as well use tf.image.resize_bilinear().

kr-ish commented 6 years ago

@MarvinTeichmann is this why the decoder has no non linear activations? Since only the encoder needs to be trained? Trying to understand the intuition of this. Thanks!