How to design n-dimensional feature descriptor similar as the input image?
The problem was with the tf.reshape. Instead I replaced it with pd_input = Reshape((2, 2, 256))(p_encoder). Finally I got the desired output which is same as input (265, 256, 3).