def __init__(self, channels, use_conv, dims=2, out_channels=None):
    super().__init__()
    self.channels = channels
    self.out_channels = (out_channels or channels)
    self.use_conv = use_conv
    self.dims = dims
    if use_conv:
        self.conv = conv_nd(dims, self.channels, self.out_channels, 3, padding=1)
def __init__(self, channels, use_conv, dims=2, out_channels=None):
    super().__init__()
    self.channels = channels
    self.out_channels = (out_channels or channels)
    self.use_conv = use_conv
    self.dims = dims
    if use_conv:
        self.conv = conv_nd(dims, self.channels, self.out_channels, 3, padding=1)