In PyTorch 2.6 we changed the default value of the weights_only argument in torch load

Ошибка в Python Traceback (most recent call last): File «C:/Users/User/Desktop/process/script.py», line 7, in <module> detect = torch.load(«C:\\Users\Alf\Desktop\process\detV4.pth»).to(device) File «C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py», line 1524, in load raise pickle.UnpicklingError(_get_wo_message(str(e))) from None _pickle.UnpicklingError: Weights only

Подробнее