Undergraduate/ML & DL
[DL] 좋은 초기화 방법💡
[문제] 우리는 AI모델 학습을 위해 학습 파라미터의 초기값을 설정해야 합니다. 사실 학습 과정에서 변경될 값이기 때문에 그리 중요하지 않다고 생각하실지도 모르지만, 피어세션에서 언급된 것처럼 이러한 초기값 설정은 gradent descent 상황에서 출발 위치를 선정하는 것과도 같습니다. 다른 건 몰라도, 극소 값과 가까운 위치에서 초기화 된다면 학습이 빨리 끝나겠죠?! 물론 비용 함수가 극소 값이 되는 가중치 조합을 알고 학습을 시작하지는 않으니 이런 방법을 초기값 설정에 적용할 수는 없습니다만, 분명한 것은 초기값을 잘 설정하면 학습 비용을 줄일 수 있고, 이를 잘 설정하기 위한 연구들도 다양하게 존재합니다 (●'◡'●) **그렇다면, 다음 중 초기값을 가장 잘 설정한 Case는 어떤..
![[Research] 문헌조사① : Face Mask Detection](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FWLn5S%2FbtqI7w9efch%2F2LMNwPHzGyCVp5o640Z0c1%2Fimg.png)
[Research] 문헌조사① : Face Mask Detection
Face Mask Detection using Transfer Learning of InceptionV3 Authors G. Jignesh Chowdary 1 , Narinder Singh Punn 2 , Sanjay Kumar Sonbhadra 2 , and Sonali Agarwal 2 Abstract According to WHO, the most effective preventive measure against COVID-19 is wearing a mask in public places and crowded areas. In this paper, a transfer learning model is proposed to automate the process of identifying the peo..
[winSCP] 서버 사용 시 유용한 프로그램
https://winscp.net/eng/docs/lang:ko#winscp_%EC%84%A4%EC%B9%98 WinSCP 소개 :: WinSCP WinSCP 소개 WinSCP는 Windows용 그래픽 유저 인터페이스 SFTP 및 FTP 클라이언트 프로그램이고 오픈소스 프리웨어입니다. 레거시 SCP 프로토콜 역시 지원합니다. 이 프로그램을 사용하여 로컬 컴퓨터와 winscp.net 서버를 사용하다보면 로컬과 파일을 주고 받는게 필요할 때가 있는데 이때 터미널에서 scp 명령어를 사용하지 않고도 UI로 보면서 드래그 앤 드롭으로 파일을 주고 받을 수 있는 툴이다
![[Face Recognition] 얼굴 인식 출입, 어떻게 하는걸까?](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbeIA64%2FbtqEhP0yIXo%2FBXD5JY46kTuSWLaZXIdNp0%2Fimg.png)
[Face Recognition] 얼굴 인식 출입, 어떻게 하는걸까?
Siamese Network 두 사람이 같은 사람인지 알기 위해 두 개 사진의 '거리(distance)'를 계산함 사람인지 알기 위해 함수 d를 계산하는 인코딩을 구하는 것 신경망은 128차원의 인코딩 f(x)를 반환함 Triplet loss 항상 하나의 앵커 이미지를 살펴본 다음 같은 사람인 것을 뜻하는 긍정 이미지와 앵커 이미지 사이의 거리를 구하고, 반대의 경우(다른 사람의 사진과의) 거리를 구함 항상 3개의 (Anchor, Positive, Negative) 이미지를 보기 때문에 'Triple loss'인 것 ||f(A)-f(P)||^2 ≤ ||f(A)-f(N)||^2 (|| ||
![[PyTorch tutorial] 컴퓨터 비전(Vision)을 위한 전이학습(Transfer Learning)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FsPFWQ%2FbtqD6POtOsA%2FYVTO3oackcwKrUkNmH03lk%2Fimg.png)
[PyTorch tutorial] 컴퓨터 비전(Vision)을 위한 전이학습(Transfer Learning)
원문 컴퓨터 비전(Vision)을 위한 전이학습(Transfer Learning) — PyTorch Tutorials 1.4.0 documentation Note Click here to download the full example code 컴퓨터 비전(Vision)을 위한 전이학습(Transfer Learning) Author: Sasank Chilamkurthy번역: 박정환 이 튜토리얼에서는 전이학습(Transfer Learning)을 이용하여 이미지 분류를 tutorials.pytorch.kr 전이학습이란? Deep하게 이미 학습된 알고리즘을 pretrained model로 가지고 와서 일무 layer만을 학습하는 방법 모델 학습 시간을 파격적으로 줄일 수 있기 때문에 아주 유용 torchvisi..
[GPU] 다수의 GPU 중 원하는 GPU 타겟팅하기
GPU가 여러대인 서버 환경에서 협업하는 경우 꼭 알아두어야 함 여러 방법이 있지만 Jupyter notebook 환경에서 적합하도록 구현 import torch # 현재 Setup 되어있는 device 확인 device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') print ('Available devices ', torch.cuda.device_count()) print ('Current cuda device ', torch.cuda.current_device()) print(torch.cuda.get_device_name(device)) Available devices 3 Current cuda device 2 Tesla V100-..
![[PyTorch tutorial] PyTorch에서 GPU 활용하기](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FXhGzW%2FbtqD54wXPxG%2F8e7wmcAUJxYyqnL1aM0pgK%2Fimg.png)
[PyTorch tutorial] PyTorch에서 GPU 활용하기
PyTorch에서 GPU를 활용하는 법은 간단하다. "모델을 GPU에 넣어주면 됨" device = torch.device("cuda:0") model.to(device) 모든 텐서를 GPU에 넣어줌(input, lable 등) mytensor = my_tensor.to(device) GPU 활용 예시 데이터 로드 import torch import torch.nn as nn from torch.utils.data import Dataset, DataLoader # Parameters and DataLoaders input_size = 5 output_size = 2 batch_size = 30 data_size = 100 GPU 설정 device = torch.device("cuda:0" if torc..
![[PyTorch tutorial] 파이토치로 딥러닝하기 : 60분만에 끝장내기](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FJAC3O%2FbtqD7Gvd0Da%2FmHTdnqhi7UZ3NTwbGK7CwK%2Fimg.png)
[PyTorch tutorial] 파이토치로 딥러닝하기 : 60분만에 끝장내기
AUTOGRAD: 자동 미분 자코비안 행렬 소개 : 잘 정리된 영상이 있어서 킵 선형 변환 : x와 y축 각각 '한 칸'의 포인트가 선형으로 변환됨 좌표계의 변환, 해당 변환을 행렬로 표시할 수 있음 기저벡터 : [[1,0],[0,1]] 선형변환 : [[a,b],[c,d]] 넓이 : ad-bc (행렬식의 기하학적 의미) 비선형 변환 : radius / 세타 값으로 변환 신경망 정의하기 신경망 클래스 선언 import torch import torch.nn as nn import torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() # 1 input image channel, 6 output..