일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- mocov3
- simclrv2
- semi supervised learnin 가정
- UnderstandingDeepLearning
- adamatch paper
- CGAN
- BYOL
- shrinkmatch paper
- Meta Pseudo Labels
- cifar100-c
- SSL
- tent paper
- 컴퓨터구조
- shrinkmatch
- ConMatch
- Pseudo Label
- dann paper
- mme paper
- conjugate pseudo label paper
- CoMatch
- WGAN
- 최린컴퓨터구조
- Pix2Pix
- CycleGAN
- 딥러닝손실함수
- remixmatch paper
- dcgan
- GAN
- Entropy Minimization
- 백준 알고리즘
Archives
- Today
- Total
Hello Data
nn.AdaptiveAvgPool2d 란? 본문
일단 공식문서를 살펴보는게 가장 정확하니 한번 살펴보았다. 파이토치 공식문서
핵심이 되는 어구를 한번 찾아보자면
The output is of size H x W, for any input size. The number of output features is equal to the number of input planes.
이라고 할 수 있다.
예시로 살펴보는게 제일 빠르니 한번 보겠다.
input = torch.rand(1, 3, 3)
maxp = nn.AdaptiveAvgPool2d((2,2))
output = maxp(input)
output
tensor([[[0.1934, 0.2858],
[0.5547, 0.6766]]])
3x3크기의 input을 넣어주었고 AdaptiveAvgPool에는 (2,2)를 넣어주었는데 그 결과는 파라미터의 크기와 같았다.
input = torch.rand(1, 5, 5)
maxp = nn.AdaptiveAvgPool2d((2,2))
output = maxp(input)
output
tensor([[[0.4823, 0.5718],
[0.3015, 0.6687]]])
5x5크기의 input을 넣어주어도 인자를 따로 바꾸지 않는한 크기는 같은 걸 확인할 수 있다.
따라서 이러한 풀링은 본인이 원하는 대로 크기를 맞출 수 있다는 것이 가장 큰 특징이다.
23.1.30 추가) SENet에서 Global AvgPooling을 사용한 내용이 나오는데 아마 표기만 다르지 기대효과는 Adaptive AvgPooling이랑 똑같다.
'딥러닝 > 파이토치' 카테고리의 다른 글
Depthwise seperable convolution 이해해보기(XceptionNet, MobileNet) (0) | 2023.01.25 |
---|---|
transforms.Resize (0) | 2023.01.21 |
nn.ReLU 에서의 inplace = True 의미 (0) | 2023.01.19 |
nn.MaxPooling 에서의 ceil mode (0) | 2023.01.19 |
nn.ModuleList에 대해 알아보기 (0) | 2022.12.31 |