@tom hi Thomas and thank you very much for reinforcing my knowledge about the differences between Theano/Lasagne and PyTorch.
I am an engineer and my main goal is to find a solution for my project. It is not that I am writing a code from scratches in PyTorch. As you have noticed my problem now is porting a code from Theano/Lasagne to PyTorch. I am doing this because in PyTorch it is easier to debug and there is more support, and I am experiencing this myself even communicating with you right now. In this porting procedure I would preferred to change the original code as less as possible up to that degree that gives me the possibility to debug it easier.
I understand that the workflow philosophy behind PyTorch is different from that of Theano/Lasagne. Telling you the truth PyTorch workflow is the one that I am used to, and it took me a while till I understood the workflow of Theano/Lasagne. Some times (I mean most of the times :-)) people do not have the luxury to be picky, they just have to float with the current. Even in my case I do not have the luxury of being picky in that sense that: no this is not exactly PyTorch, that is half Theano half PyTorch. With this I mean no offense for anyone else that is stringent in crossing the borders between the two libraries. My main goal is to complete my project with any reasonable mean possible.
I am trying to explain that I know this is not the best way to write a code.
Please know that I appreciate very much the help and advises offered by you guys all.
Cheers.
Ergnoor