본문 바로가기

반응형

Data-science/deep learning

(87)
[imaginaire] coco-funit, mode collapse 문제 해결 삽질 coco-funit에서 발생한 문제 github.com/NVlabs/imaginaire/issues/43 mode collapse · Issue #43 · NVlabs/imaginaire hi, when I trained with coco_funit, In the first few epochs, the results are normal, but mode collapse appears from the 59th epoch. Is this normal? Will it also appear during your training? github.com Mode collapse... 해결 방안 1. learning rate 줄이기 - discriminator learning rate : 1e-4 -> 1e-5 - g..
[nvidia-docker] pytorch 실행시 메모리 문제 --ipc=host 부분을 run 시 추가해준다. curioso365.tistory.com/136 docker 컨테이너에서 pytorch 실행시 메모리 에러 해결 문제 docker에 pytorch 개발 환경을 구축하여 실행 시키고 컨테이너 안에서 관련 코드는 돌리니 다음과 같은 에러 메시지가 발생하였다. ERROR: Unexpected bus error encountered in worker. This might be caus.. curioso365.tistory.com
[nvidia-docker] NGC 설치로 pytorch build 필요없이 실행하기 - nvidia imaginaire 이용하는 법 하게된 배경 github.com/NVlabs/imaginaire NVlabs/imaginaire NVIDIA PyTorch GAN library with distributed and mixed precision support - NVlabs/imaginaire github.com imaginaire라는 라이브러리가 있다. 해당 라이브러리는 cuda 10.2로만 동작한다. RTX 30 시리즈는 cuda 10.2에서 지원하지 않는다는 게 문제... apex라는 라이브러리가 torch와 뭔가 연동이 되지 않아서 빌드부터 다시 해야한다고 들었다. 그런데 우리의 NGC는 apex와의 build를 cuda 11.2에서도 다 해놓았다! (NGC는 Nvidia Gpu Cloud의 약자로 Nvidia에서 AI를 쉽게 할..
[pytorch] type casting 하기, 타입 변환하기 가끔 가다가 RuntimeError: expected scalar type Float but found Double 이런 에러가 발생한다. 그럴경우... a 라는 텐서가 있으면 아래와 같이 케스팅해주면 된다. type도 변환된 자기 자신을 리턴한다. a = a.type(torch.FloatTensor).to(device)
nvidia-smi랑 nvcc --version이 다를 때 걱정할 필요가 없다고 한다. 보통 nvidia-smi 버전이 nvcc보다 한 단계 높게 나올 수도 있다고. nvcc가 cuda 작동에 필요한 binary 파일과 관련되어 있다. 나의 경우 window 10에서 nvidia-smi는 11.1로, nvcc --version 10.2로 나왔다. bash에서 which nvcc를 통해 CUDA 설치 경로를 확인해보니 11.1은 없었다. pytorch와 tensorflow를 이용하는 사람이라면 nvcc version을 기준으로 설치하면 되겠다. 끝 stackoverflow.com/questions/53422407/different-cuda-versions-shown-by-nvcc-and-nvidia-smi Different CUDA versions shown by..
Closed-Form Factorization of Latent Semantics in GANs 논문 설명 latent space를 조절해서 이미지를 편집하는 종전의 기술은 지도 학습 기반으로 시행됐다. 이 논문에선 비지도학습 기반으로 이걸 가능하게 한다. pretrained weights를 분해하는 걸로 closed-from factorization 알고리즘을 제안했다.  지도학습 방식은? latent code에서 임의로 샘플링하여 이미지를 생성하고 이것들을 annotation 한 후 classifier를 학습하는 형식이었다. 이 논문의 방식은 SeFa(Semantic Factorization)으로, 학습이나 샘플링과는 무관하게 GAN에서 latent의 semantic direction(의미가 담긴 방향)을 찾을 수 있다. GAN은 latent code를 단계별로 네트워크를 거쳐 이미지로 합성한다. 이때 ..
[pytorch] inference시 memory leak, 메모리 과부하 문제 몇 시간은 삽질한 문제이다.... 모델을 학습하는 것도 아닌, inference 하는 중인데 메모리가 계속 부족했다. 대체 이해가 안됐다. 0. model.eval() 하기 1. 그래서 tensor 안 쓰는 건 바로 del하고 gpu cache를 비우기 2. del하고 garbage collection을 소환 그다음 gpu cache를 비우기 3. 장치를 cuda에서 cpu로 전환 후 위 1, 2 과정을 시도하기 import gc def memorydel(listobj): try: for obj in listobj: del obj except Exception as e: print(e) try: del listobj except Exception as e: print(e) gc.collect() torc..
[petcon] stylegan2 distillation 찾다가 다른 좋은 거 찾음 encoding + distillation 한 번에 보호되어 있는 글입니다.

728x90
반응형