Thank you so much guys for quick reply, it is working now.
Note -  Can you provide any link for understanding.
1- How to decide which optimizer we have to use(Adam vs SGD)
2-  The computation graph.
3-  Which operations breaks the computation graph.
4-  How can I visualise these graphs while building a CNN in PyTorch.