55 in_channels (int) : 입력 채널수
56 stage_blocks (List) : 스테이지 마다 쌓는 블럭의 수를 설정
57 input_key (str) : 모듈의 inference에서 사용하는 입력데이터의 키값
68 self.
conv1 = nn.Conv2d(in_channels, self.
inplanes, kernel_size=1, stride=1, padding=0, bias=
True)
70 self.
relu = nn.ReLU(inplace=
True)
79 def _make_layer(self, block, planes: int, blocks: int, stride: int = 1) -> nn.Sequential:
84 if stride != 1
or self.
inplanes != planes:
85 downsample = nn.Sequential(
86 nn.Conv2d(self.
inplanes, planes, kernel_size=1, stride=stride),
87 nn.BatchNorm2d(planes)
91 layers.append(block(self.
inplanes, planes, stride, downsample))
93 for _
in range(1, blocks):
94 layers.append(block(self.
inplanes, planes))
96 return nn.Sequential(*layers)