Deep Learning study

[Pytorch] torch.nn.Conv2d 본문

AI/Pytorch api

[Pytorch] torch.nn.Conv2d

HwaniL.choi 2018. 4. 1. 18:30
반응형
class torch.nn.Conv2d(in_channelsout_channelskernel_sizestride=1padding=0dilation=1groups=1bias=True)


Conv2d의 parameters는 차례대로 in_channels, out_channels, kernel_size, stride, padding, diction , groups, bias 가 있다.


필수 요소로는 in_channels, out_channels,kernel_size 가있다. 


in_channels(int) : input image의 channel수 이다. rgb이미지라면 3이 되겠다.


out_channels(int) : convolution에 의해서 생성된 channel의 수 이다. 


kernel_size(int or tuple) : convoling_kenel 의 크기이다. 보통은 filter라고 부르는 것과 동일하다.


stride(int or tuple) : convolution의 stride를 얼만큼 줄 것이가 이다. Default는 1이다.


padding(int or tuple) : zero padding을 input의 양쪽에 인자 만큼 해준다. Default는 0이라서 기본적으로 설정해주지 않으면 zero padding은 하지 않는다.



이정도만 알면 될것같다. 


 


원문보러가기

반응형

'AI > Pytorch api' 카테고리의 다른 글

[Pytorch]torch.nn.functoinal.pad()  (2) 2020.12.29
[Pytorch] torch.Tensor.view  (0) 2018.05.23
[Pytorch] torch.nn.Sequential  (0) 2018.04.02
[Pytorch] torch.nn.Upsample  (0) 2018.04.01
Comments