CAC-Unet 돌리기위해 필요한 환경설정.

boingboing·2024년 3월 12일
post-thumbnail
  • CAC-Unet github에 명시된 환경
Pytorch 1.0
Python 3+
cuda 9.0+
  • 현재 conda로 가상환경 실행.
python 3.6.9, pytorchCPU 1.5.1, pytorchGPU 1.5.1, cuda 10.2, cudnn 7.6.5, torchvision 0.6 

실행 명령어

conda install pytorch==1.5.1 torchvision==0.6.1 cudatoolkit=10.2 -c pytorch``` (pytorch conda 채널에서 받아 온다.)
  • python 3.6으로 한 이유: pytorch 1.0과의 호환을 위해.
  • pytorch 1.5 로 한 이유: 1.5 이상부터 apex모듈이 내장됨.
  • github상에는 pytorch 1.0 라고 되어있는데, pytorch 1.0 GPU 버전이 안 깔림..
  • CUDA 10.2 로 한 이유
python train.py --config_file='config/cac-unet-r50.yaml'

이 명령어 실행.

  1. albumentation 라이브러리 설치 문제
    https://velog.io/@sandartchip/No-module-named-albumentations

  2. 환경 문제
    -> apex로 코딩이 되있어서 apex를 돌려야 함.

apex 실행에 필요한 명령어

pip install -v --disable-pip-version-check --no-build-isolation --no-cache-dir ./ 
실행결과

이 문제 발생.

AttributeError: module 'torch.distributed' has no attribute '_reduce_scatter_base'

https://velog.io/@sandartchip/AttributeError-module-torch.distributed-has-no-attribute-reducescatterbase

0개의 댓글