How to design a network so that I can input the square images (e.g. 256*256) and output the rectangle images (256*1024)?

How to design a network so that I can input the square images (e.g. 256 256) and output the rectangle images (256 1024)?