Thanks for the response @Bhack
The code that I have shared above should implementat the model architecture specified in the block quotes.
But my code clearly does not do that.  I’d really be grateful if you could look at my code and suggest edits to it so that it represents the architecture described in the block quotes.
Architecture of the model is also given as an image in the paper whose link I have shared above. I’m not able to attach images (because of permissions i guess) otherwise I would have added that also.