Zardinality / TF_Deformable_Net

Deformable convolution net on Tensorflow
MIT License
169 stars 53 forks source link

About the data format in deformable psroi pooling #9

Open abuzn opened 7 years ago

abuzn commented 7 years ago

in lib/networks/network.py, the function "deform_psroi_pool" I think the inputs data format have been converted into [NCHW], so the output data format of this function is still [NCHW]? If so, the following code in "fc" function if data_format=="NCHW": feed_in = tf.reshape(tf.transpose(input,[0,3,1,2]), [-1, dim]) will convert the data to [NWCH]?

Zardinality commented 7 years ago

Right, since deform_psroi_pool is always followed by a fc layer, I assumed the data format is transformed back to the default NHWC after passing through fc layer. When ported to another different network it is indeed a problem that should be awared.