Please find the ipython notebook in this link: https://drive.google.com/file/d/13Wtpd-Ur7tUO3mGpXQU2H08rNNyyqUyf/view?usp=sharing 5
The input to the model is 4D and output is 1D (regression problem). The code that I have shared is a simplification of the actual network while capturing the bug I am encountering.