def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, dilation=1, dropout_prob=0.0, bias=False, non_linear='ReLU'):
    super(DilatedBlock, self).__init__()
    self.relu = NON_LINEARITY[non_linear]
    self.internal_channels = (in_channels // 4)
    self.conv1 = nn.Conv2d(in_channels, self.internal_channels, 1, bias=bias)
    self.conv1_bn = nn.BatchNorm2d(self.internal_channels)
    self.conv2 = nn.Conv2d(self.internal_channels, self.internal_channels, kernel_size, stride, padding=int((((kernel_size - 1) / 2) * dilation)), dilation=dilation, groups=1, bias=bias)
    self.conv2_bn = nn.BatchNorm2d(self.internal_channels)
    self.conv4 = nn.Conv2d(self.internal_channels, out_channels, 1, bias=bias)
    self.conv4_bn = nn.BatchNorm2d(out_channels)
    self.regul = nn.Dropout2d(p=dropout_prob)
def __init__(self, in_channels, out_channels, kernel_size=3, stride=1, dilation=1, dropout_prob=0.0, bias=False, non_linear='ReLU'):
    super(DilatedBlock, self).__init__()
    self.relu = NON_LINEARITY[non_linear]
    self.internal_channels = (in_channels // 4)
    self.conv1 = nn.Conv2d(in_channels, self.internal_channels, 1, bias=bias)
    self.conv1_bn = nn.BatchNorm2d(self.internal_channels)
    self.conv2 = nn.Conv2d(self.internal_channels, self.internal_channels, kernel_size, stride, padding=int((((kernel_size - 1) / 2) * dilation)), dilation=dilation, groups=1, bias=bias)
    self.conv2_bn = nn.BatchNorm2d(self.internal_channels)
    self.conv4 = nn.Conv2d(self.internal_channels, out_channels, 1, bias=bias)
    self.conv4_bn = nn.BatchNorm2d(out_channels)
    self.regul = nn.Dropout2d(p=dropout_prob)