DrawingProcess
드프 DrawingProcess
DrawingProcess
전체 방문자
오늘
어제
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
  • 분류 전체보기 (970)
    • Profile & Branding (25)
      • Career (18)
    • IT Trends (254)
      • Conference, Faire (Experien.. (31)
      • News (187)
      • Youtube (19)
      • TED (8)
      • Web Page (2)
      • IT: Etc... (6)
    • Contents (98)
      • Book (67)
      • Lecture (31)
    • Project Process (94)
      • Ideation (0)
      • Study Report (34)
      • Challenge & Award (22)
      • 1Day1Process (5)
      • Making (5)
      • KRC-FTC (Team TC(5031, 5048.. (10)
      • GCP (GlobalCitizenProject) (15)
    • Study: ComputerScience(CS) (72)
      • CS: Basic (9)
      • CS: Database(SQL) (5)
      • CS: Network (14)
      • CS: OperatingSystem (3)
      • CS: Linux (39)
      • CS: Etc... (2)
    • Study: Software(SW) (95)
      • SW: Language (29)
      • SW: Algorithms (1)
      • SW: DataStructure & DesignP.. (1)
      • SW: Opensource (15)
      • SW: Error Bug Fix (43)
      • SW: Etc... (6)
    • Study: Artificial Intellige.. (150) N
      • AI: Research (1)
      • AI: 2D Vision(Det, Seg, Tra.. (35)
      • AI: 3D Vision (71) N
      • AI: MultiModal (3)
      • AI: SLAM (0)
      • AI: Light Weight(LW) (3)
      • AI: Data Pipeline (7)
      • AI: Machine Learning(ML) (1)
    • Study: Robotics(Robot) (33)
      • Robot: ROS(Robot Operating .. (9)
      • Robot: Positioning (8)
      • Robot: Planning & Control (7)
    • Study: DeveloperTools(DevTo.. (83)
      • DevTool: Git (12)
      • DevTool: CMake (13)
      • DevTool: NoSQL(Elastic, Mon.. (25)
      • DevTool: Container (17)
      • DevTool: IDE (11)
      • DevTool: CloudComputing (4)
    • 인생을 살면서 (65)
      • 나의 취미들 (7)
      • 나의 생각들 (42)
      • 여행을 떠나자~ (10)
      • 분기별 회고 (6)

개발자 명언

“ 매주 목요일마다 당신이 항상 하던대로 신발끈을 묶으면 신발이 폭발한다고 생각해보라.
컴퓨터를 사용할 때는 이런 일이 항상 일어나는데도 아무도 불평할 생각을 안 한다. ”

- Jef Raskin

맥의 아버지 - 애플컴퓨터의 매킨토시 프로젝트를 주도

인기 글

최근 글

최근 댓글

티스토리

hELLO · Designed By 정상우.
DrawingProcess

드프 DrawingProcess

Study: Software(SW)/SW: Error Bug Fix

[Error fix] Solved 'AttributeError: module ‘torch.cuda’ has no attribute ‘_UntypedStorage’'

2024. 1. 8. 14:42
반응형

# Problem

When I trained yolact model with following command, I got a below issue.

$ python train.py --config=custom_config_ty --batch_size=3
Multiple GPUs detected! Turning off JIT.
Scaling parameters by 0.38 to account for a batch size of 3.
Per-GPU batch size is less than the recommended limit for batch norm. Disabling batch norm.
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
Initializing weights...
Begin training!

...

[  0]       0 || B: 7.891 | C: 15.078 | M: 4.267 | S: 1.053 | T: 28.289 || ETA: 143 days, 6:44:08 || timer: 5.803
[  0]      10 || B: 14.656 | C: 7.509 | M: 4.164 | S: 0.946 | T: 27.275 || ETA: 32 days, 11:15:16 || timer: 0.788
Traceback (most recent call last):
  File "train.py", line 532, in <module>
    train()
  File "train.py", line 273, in train
    for datum in data_loader:
  File "/home/avs/anaconda3/envs/yolact/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 681, in __next__
    data = self._next_data()
  File "/home/avs/anaconda3/envs/yolact/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1359, in _next_data
    idx, data = self._get_data()
  File "/home/avs/anaconda3/envs/yolact/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1325, in _get_data
    success, data = self._try_get_data()
  File "/home/avs/anaconda3/envs/yolact/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1163, in _try_get_data
    data = self._data_queue.get(timeout=timeout)
  File "/home/avs/anaconda3/envs/yolact/lib/python3.7/multiprocessing/queues.py", line 113, in get
    return _ForkingPickler.loads(res)
  File "/home/avs/anaconda3/envs/yolact/lib/python3.7/site-packages/torch/multiprocessing/reductions.py", line 303, in rebuild_storage_fd
    shared_cache[fd_id(fd)] = StorageWeakRef(storage)
  File "/home/avs/anaconda3/envs/yolact/lib/python3.7/site-packages/torch/multiprocessing/reductions.py", line 65, in __setitem__
    self.free_dead_references()
  File "/home/avs/anaconda3/envs/yolact/lib/python3.7/site-packages/torch/multiprocessing/reductions.py", line 70, in free_dead_references
    if storage_ref.expired():
  File "/home/avs/anaconda3/envs/yolact/lib/python3.7/site-packages/torch/multiprocessing/reductions.py", line 35, in expired
    return torch.Storage._expired(self.cdata)  # type: ignore[attr-defined]
  File "/home/avs/anaconda3/envs/yolact/lib/python3.7/site-packages/torch/storage.py", line 757, in _expired
    return eval(cls.__module__)._UntypedStorage._expired(*args, **kwargs)
AttributeError: module 'torch.cuda' has no attribute '_UntypedStorage'

# Solution

It might happen due to mismatch of torch and cuda versions. (Matching with cuda version 11.3)

# CUDA 11.3
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge

# Reference

  • [Pytorch] INSTALLING PREVIOUS VERSIONS OF PYTORCH: https://pytorch.org/get-started/previous-versions/
  • [NVIDIA] AttributeError: module ‘torch.cuda’ has no attribute ‘_UntypedStorage’: https://forums.developer.nvidia.com/t/attributeerror-module-torch-cuda-has-no-attribute-untypedstorage/224108 
반응형
저작자표시 비영리 변경금지 (새창열림)

'Study: Software(SW) > SW: Error Bug Fix' 카테고리의 다른 글

[Error fix] Solved "The kernel failed to start due to the missing module 'IPython'. Consider installing this module. Click here for more info." (feat. VSCode Jupyter)  (1) 2024.01.30
[Error Fix] Solved: KeyError: 'I' (feat. Yolact++)  (0) 2024.01.16
[Error fix] Solved '[RTShaderSystem.cc:480] Unable to find shader lib. Shader generating will fail. Your GAZEBO_RESOURCE_PATH is probably improperly set. Have you sourced <prefix>/share/gazebo/setup.bash?'  (0) 2023.11.15
[Error fix] Solved "Error: package 'rviz_common' not found"(rviz2, colcon build)  (1) 2023.10.28
[Error Fix] Solved '/usr/bin/ld: cannot find - lBoost::serialization' (Feat. LIO SLAM, gtsam, boost)  (0) 2023.10.17
    'Study: Software(SW)/SW: Error Bug Fix' 카테고리의 다른 글
    • [Error fix] Solved "The kernel failed to start due to the missing module 'IPython'. Consider installing this module. Click here for more info." (feat. VSCode Jupyter)
    • [Error Fix] Solved: KeyError: 'I' (feat. Yolact++)
    • [Error fix] Solved '[RTShaderSystem.cc:480] Unable to find shader lib. Shader generating will fail. Your GAZEBO_RESOURCE_PATH is probably improperly set. Have you sourced <prefix>/share/gazebo/setup.bash?'
    • [Error fix] Solved "Error: package 'rviz_common' not found"(rviz2, colcon build)
    DrawingProcess
    DrawingProcess
    과정을 그리자!

    티스토리툴바