Solved by tinu445 in post #2 
              
              
                Okay this wasn’t the problem with the torch version or something. 
The problem was with my numpy version and you can simply run the following command to get it done. 
pip install -U numpy