Solved by paarandika in post #4 
              
              
                Hi, 
I think I found the issue. My Pytorch version is 1.4.0 and I was refering to 1.5.0 docs. 
Thanks again for the help.