Thanks for your input. I tried uninstalling the existing pytorch version 1.10.0+cpu using pip/conda but nothing was working. I was finally able to get rid of it by deleting the old Python folder at ‘C:\Users\Vikrant\AppData\Roaming\Python’. I created a new environment and installed Pytorch 1.12.1. Now, everything is working fine. Thanks!