| 52 | """DLA Basic""" |
| 53 | |
| 54 | def __init__(self, inplanes, planes, stride=1, dilation=1, **_): |
| 55 | super(DlaBasic, self).__init__() |
| 56 | self.conv1 = nn.Conv2d( |
| 57 | inplanes, planes, kernel_size=3, stride=stride, padding=dilation, bias=False, dilation=dilation) |
| 58 | self.bn1 = nn.BatchNorm2d(planes) |
| 59 | self.relu = nn.ReLU(inplace=True) |
| 60 | self.conv2 = nn.Conv2d( |
| 61 | planes, planes, kernel_size=3, stride=1, padding=dilation, bias=False, dilation=dilation) |
| 62 | self.bn2 = nn.BatchNorm2d(planes) |
| 63 | self.stride = stride |
| 64 | |
| 65 | def forward(self, x, shortcut=None): |
| 66 | if shortcut is None: |