pooya-mohammadi / yolov5-gradcam

Visualizing Yolov5's layers using GradCam
MIT License
281 stars 47 forks source link

RuntimeError: don't know how to restore data location of torch.HalfStorage (tagged with ) #17

Closed YTTT9 closed 2 years ago

YTTT9 commented 2 years ago

D:\anaconda\envs\yolov5\lib\site-packages\deep_utils\vision\face_detection\ultralight__init.py:3: UserWarning: No module named 'deep_utils.vision.face_detection.ultralight.torch'. If you don't use UltralightTorchFaceDetector ignore this message. UltralightTorchFaceDetector = import_module( D:\anaconda\envs\yolov5\lib\site-packages\deep_utils\vision\face_detection\ultralight__init__.py:6: UserWarning: No module named 'deep_utils.vision.face_detection.ultralight.tf'. If you don't use UltralightTFFaceDetector ignore this message. UltralightTFFaceDetector = import_module( D:\anaconda\envs\yolov5\lib\site-packages\deep_utils\callbacks\tf_keras\init.py:3: UserWarning: No module named 'tensorflow'. If you don't use LRScalar ignore this message. LRScalar = import_module( [INFO] Loading the model Traceback (most recent call last): File "main.py", line 125, in main(args.img_path) File "main.py", line 64, in main model = YOLOV5TorchObjectDetector(args.model_path, device, img_size=input_size, File "D:\AAAAAAAAA\YOLOV5-4.0\yolov5-gradcam-master\models\yolo_v5_object_detector.py", line 32, in init__ self.model = attempt_load(model_weight, device=device) File "D:\AAAAAAAAA\YOLOV5-4.0\yolov5-gradcam-master\models\experimental.py", line 80, in attempt_load ckpt = torch.load(attempt_download(w), map_location=device) File "D:\anaconda\envs\yolov5\lib\site-packages\torch\serialization.py", line 594, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "D:\anaconda\envs\yolov5\lib\site-packages\torch\serialization.py", line 853, in _load result = unpickler.load() File "D:\anaconda\envs\yolov5\lib\site-packages\torch\serialization.py", line 845, in persistent_load load_tensor(data_type, size, key, _maybe_decode_ascii(location)) File "D:\anaconda\envs\yolov5\lib\site-packages\torch\serialization.py", line 834, in load_tensor loaded_storages[key] = restore_location(storage, location) File "D:\anaconda\envs\yolov5\lib\site-packages\torch\serialization.py", line 811, in restore_location return default_restore_location(storage, map_location) File "D:\anaconda\envs\yolov5\lib\site-packages\torch\serialization.py", line 178, in default_restore_location raise RuntimeError("don't know how to restore data location of " RuntimeError: don't know how to restore data location of torch.HalfStorage (tagged with )

pooya-mohammadi commented 2 years ago

@YTTT9 The issue is solved

Totoro-wen commented 1 year ago

@YTTT9 The issue is solved

Hello, how did you solve this problem? I met this problem elsewhere.