딥러닝(16)
-
[Pytorch] Initializer (torch.nn.init)
torch.nn.init의 간단한 initializer들을 살펴보겠다 xavier같은 초기화기법들은 따로 다루기 1. torch.nn.init.normal_(tensor, mean=0.0, std=1.0) input tensor을 N(mean, std^2)의 normal distribution(정규분포)에 따라 초기화 2. torch.nn.init.uniform_(tensor, a=0.0, b=1.0) input tensor을 U(a, b)의 uniform distribution에 따라 초기화 * uniform distribution ? [a, b]의 범위에서 모든 값의 확률이 동일한 분포 3. torch.nn.init.constant_(tensor, val) input tensor를 특정 값 val로 ..
2021.06.15 -
Unpaired Image-to-Image Translationusing Cycle-Consistent Adversarial Networks (CycleGAN)
Abstract Image-to-Image translation은 vision과 graphics 문제 중 하나. 목적은 input 이미지와 output이미지를 mapping하는 것을 학습하는 것. 정렬된 이미지 쌍의 training set을 사용하여. 많은 tasks에서 paired training data는 사용 불가 paired examples없이 X→Y 변환하는 것을 배우는 접근법을 제시 mapping G: X→Y 매핑을 배우는 것이 목표. G(x)의 분포가 Y와 구분 불가능 하도록 → adversarial loss를 이용하여 왜? 이 mapping은 매우 under-contrained(? 제약이 심하다?)하기 때문에 우리는 이것을 inverse mapping F: Y→X로 짝짓고 cycle con..
2021.06.10 -
Pix2Pix code review 코드리뷰
아무래도 Test보다는 Train이 고려할 것이 많다보니 Train 과정 먼저 살펴보겠습니다. 빨간 글씨: 의문점/공부해야할 부분 1. parser에서 여러 옵션들을 parse해오고, dataset을 만들어 줌 opt = TrainOptions().parse() # get training options dataset = create_dataset(opt) # create a dataset given opt.dataset_mode and other options dataset_size = len(dataset) # get the number of images in the dataset. print('The number of training images = %d' % dataset_size) ㅇ이 과정에서 ..
2021.04.08 -
Batch Normalization
※ batch normalization 논문, 동빈나 유튜브 및 다른 자료를 참조하였습니다. 논문이나, kaggle 등 competition에서 batch normalization을 많이 접하게 된다. batch normalization (BN)은 어떤 효과를 가져올까? lr을 잘못 잡으면 gradient가 explode / vanish하거나 local minimum에 빠지는 경우가 생기던 기존 문제 -> parameter scale때문이라고 정의 -> BN수행시 parameter scale의 영향을 받지 않아 높은 lr설정 가능 -> 빠른 학습 weight 초기화에 대한 민감도가 낮아진다 ( lr 등의 hyper parameter 설정에 대한 부담을 줄일 수 있다.) 모델을 일반화 하는 효과(train..
2021.04.02 -
SPPNet
github: github.com/chaeyeongyoon/ComputerVision_Study chaeyeongyoon/ComputerVision_Study Contribute to chaeyeongyoon/ComputerVision_Study development by creating an account on GitHub. github.com 개발 순서로 보면 R-CNN -> SPPNet -> Faster RCNN순입니다. SPPNet은 RCNN의 문제점을 많이 개선했습니다. 2000개의 region proposal이미지를 CNN에 입력하지 않고 원본 이미지만 CNN으로 Feature Map을 생성하여 뒤의 원본 이미지의 Selective search로 추천된 영역을 Feature map에 mappi..
2021.01.03 -
R-CNN(Regions with CNN)
※ 본 글은 강의 및 여러 자료를 참고하여 쓰여진 글입니다. ※ github: github.com/chaeyeongyoon/ComputerVision_Study chaeyeongyoon/ComputerVision_Study Contribute to chaeyeongyoon/ComputerVision_Study development by creating an account on GitHub. github.com RCNN은 2-stage object detection의 대표적인 방법입니다. stage 1 Region Prposal selective search로 2000개의 object가 있을만한 region을 추천해줍니다. stage 2 CNN Detection ImageNet으로 Pretrained된 A..
2021.01.03