def forward(self, inputs):
H = self.conv1(inputs)
if not self.pre_act:
H = self.bn1(H)
H = F.relu(H)
for section_index in range(self.num_sections):
H = getattr(self, f'section_{section_index}')(H)
if self.pre_act:
H = self.bn1(H)
H = F.relu(H)
H = F.avg_pool2d(H, H.size()[2:])
H = H.view(H.size(0), -1)
outputs = self.fc(H)
return outputs
评论列表
文章目录