본문 바로가기

전체 글37

mac, pycharm, docker container ssh 맥북 에어 m1을 가지고 개발 환경을 세팅했다. 여러 시행착오를 겪었고 간단하게 메모를 해둔다. 1. 우분투에 엔비디아 드라이버를 깔지 않아 개고생. 2. ssh interpreter 설정에서 서버 이름을 root으로 해야됨. 3. 인터프리터를 컨테이너의 conda/ bin/ python3.7로 해야함. 4. 추가적으로 모듈을 설치할때는 conda install 로 설치해야됨. 2021. 7. 30.
Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: .. docker를 사용해보는중. 맥 -> 서버 ssh docker container 를 이용하여 파이참을 통해 디버깅해보고 싶음. 도커의 컨테이너에서 gpu를 사용하기위해 nvidia-container-toolkit을 설치하고 docker run --gpus all nvidia/cuda:10.0-base nvidia-smi 해봤지만 제목과 같은 오류만 발생.. 이것저것 뻘짓을 다해보다가 서버 컴퓨터에 우분투를 설치하고나서 엔비디아 드라이버를 설치안했다는 것을 깨달음. https://www.oofbird.me/55 를 참고하여 드라이버 설치후 다시 컨테이나를 런해봤음. 결과는 성공! 2021. 7. 30.
can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first. Change index = output.data.numpy().argmax() to index = output.cpu().data.numpy().argmax() This means data is first moved to cpu and then converted to numpy array 2021. 6. 18.
[pytorch] inference시 memory leak 출처: https://study-grow.tistory.com/entry/pytorch-inference%EC%8B%9C-memory-leak-%EB%A9%94%EB%AA%A8%EB%A6%AC-%EA%B3%BC%EB%B6%80%ED%95%98-%EB%AC%B8%EC%A0%9C inference, validation 시에는 gradient 계산을 하지 않는다. 그래서 이 함수는 인퍼런스시에 유용하고 메모리 소비를 감소시켜준다고 한다. eval은 왜 안 된걸까? eval은 특정 모듈들 (dropout이나 batch normalization 등)의 모드를 변경하는 역할을 한다. 이 모듈들은 학습할 때 작동하는 방식과 추론(inference)할 때 작동하는 방식이 다르다. 그걸 조정해주는 거다. 즉, 메모리와는.. 2021. 6. 18.
파이토치 에러 Traceback (most recent call last): File "C:/Users/choi/PycharmProjects/third_project/git_test.py", line 4, in from torchvision import datasets File "C:\Users\choi\anaconda3\envs\pytest\lib\site-packages\torchvision\__init__.py", line 1, in from torchvision import models File "C:\Users\choi\anaconda3\envs\pytest\lib\site-packages\torchvision\models\__init__.py", line 11, in from . import detectio.. 2021. 6. 17.
Prototypical Networks for Few-shot Learning _ 논문 리뷰_미완성 퓨샷 러닝을 보통 적은 양의 데이터를 가지고 인고지능을 학습시키는 방법중 하나라고한다. 세미나를 통해 느낀점은 퓨샷 러닝은 새로운 데이타가 모델에 주어졌을때 이를 잘 처리할수 있게끔 훈련시키는 방법에 더 가깝다는 점이다. 예를 들자면, 개와 고양이에 대해서 학습한 모델이 말이라는 새로운 클래스를 추가적으로 분류시킬수 있도록 하는것이다. 우선 퓨샷 러닝에서 사용하는 용어인 N-way K-shot에 대해서 알아보자. N-way 는 N개의 클래스가 있다는 말이다. K-shot 은 각각의 클래스에 K개의 라벨 데이타가 존재한다는 의미다. 다음은 Meta-learning 학습 방법에 대해서 알아보자. 여기서 Meta가 왜 붙었는지는 잘 모르겠다. 왼쪽의 데이타 모음이 Meta-dataset이다. 이로부터 Epis.. 2021. 4. 8.
Unsupervised speech representation learningusing WaveNet autoencoders _ 논문 리뷰 Creating good data representations is important. The goal is to learn a representation able to capture high level semantic content from the signal, e.g. phoneme identities. 이 논문의 목표는 좋은 latent를 찾는것이다. 좋은 latent란 해석가능하며 신호의 high level의 의미있는 정보를 포착가능하게 해주는것을 의미한다. 이 논문에서는 왜 supervised 가 아닌 unsupevised 러닝을 사용했을까? 2가지 단점이 supervised에는 존재하기 때문이다. 첫번째, 많은 양의 라벨데이타를 요구한다는 것이다. 많은 양의 양질의 라벨 데이타는 구하기도 힘들.. 2021. 4. 7.
A Wavenet for Speech Denoising 오늘은 요즘 연구과제를 진행하면서 네트워크 모델로 사용하고 있는 디노이징을 위한 웨이브넷에 대한 간단한 리뷰를 하고자 한다. 기존의 웨이브넷에 대해서 배경지식을 가지고 있다는 가정하에 기존의 웨이브넷과의 차이점을 위주로 리뷰를 진행한다. Wavenet 기존의 웨이브넷은 Causal, Dilated Conv. 를 활용한것이 특징이다. - Causal Conv. 실시간으로 raw audio를 처리하고자 현재 값과 과거 값만을 사용하기 때문에 사용한 것으로 이해했다. - Dilated Conv. 16KHz의 샘플링 레이트를 가지는 raw audio data가 있다고 생각하자. 1초의 data를 입력으로 한다. = 16만개의 샘플을 네트워크의 입력으로 한다. 우리에게는 짧다고 생각되는 1초 조차 네트웍 입장에서.. 2021. 1. 4.
프로그래머스_다트게임_파이썬 def solution(dartResult): answer = [] dartResult = dartResult.replace('10','X') point = ['10' if i == 'X' else i for i in dartResult] # print(point) SDT = ["S","D","T"] for i in point: if i in SDT: answer[-1] = answer[-1]**(SDT.index(i)+1) elif i == "*": answer[-1] *= 2 if len(answer) > 1 : answer[-2] *= 2 elif i == "#": answer[-1] *= -1 else: answer.append(int(i)) print(answer) return sum(answe.. 2020. 12. 28.