(self, x)
| 92 | self._init_weight() |
| 93 | |
| 94 | def forward(self, x): |
| 95 | x1 = self.aspp1(x) |
| 96 | x2 = self.aspp2(x) |
| 97 | x3 = self.aspp3(x) |
| 98 | x4 = self.aspp4(x) |
| 99 | x5 = self.global_avg_pool(x) |
| 100 | x5 = F.interpolate(x5, |
| 101 | size=x4.size()[2:], |
| 102 | mode='bilinear', |
| 103 | align_corners=True) |
| 104 | x = torch.cat((x1, x2, x3, x4, x5), dim=1) |
| 105 | |
| 106 | x = self.conv1(x) |
| 107 | x = self.bn1(x) |
| 108 | x = self.relu(x) |
| 109 | |
| 110 | return self.dropout(x) |
| 111 | |
| 112 | def _init_weight(self): |
| 113 | for m in self.modules(): |