Are you on the latest version of PyTorch (v.1.3.0)? You can check with print(torch.__version__). WeakScriptModuleProxy was removed prior to the 1.3 release, so you may need to update to get the right fixes.