def __init__(self, J, num_channels, num_features, track, normalizer_name, activation_name, inter_factor):
        super(Bottleneck, self).__init__()
        inter_channels = inter_factor*num_features

        self.bn1 = get_normalizer(normalizer_name, J*num_channels, track)
        self.conv1 = nn.Conv2d(J*num_channels, inter_channels, 1)
        self.act1 = get_activation_function(activation_name)

        self.bn2 = get_normalizer(normalizer_name, inter_channels, track)
        self.conv2 = nn.Conv2d(inter_channels, num_features, 1)
        self.act2 = get_activation_function(activation_name)
 def __init__(self, J, num_channels, num_out_channels, track,
              normalizer_name, activation_name):
     super(Transition, self).__init__()
     self.bn = get_normalizer(normalizer_name, num_channels * J,
                              track).to(device)
     self.conv = nn.Conv2d(J * num_channels, num_out_channels, 1)
     self.act = get_activation_function(activation_name)
 def __init__(self, J, num_channels, num_features, track, normalizer_name,
              activation_name):
     # number of in channels is num_channels; number of out channels is num_channels+num_features
     # i.e. output dim = input dim + num_features
     super(SingleLayer, self).__init__()
     num_output = int(num_features / 2)
     self.conv1 = nn.Conv2d(num_channels * J, num_output, 1).to(device)
     self.conv2 = nn.Conv2d(num_channels * J, num_output, 1).to(device)
     self.bn = get_normalizer(normalizer_name, num_features,
                              track).to(device)
     self.act = get_activation_function(activation_name)
 def __init__(self, J, num_channels, num_features, track, normalizer_name, activation_name):
     super(SingleLayer, self).__init__()
     self.bn = get_normalizer(normalizer_name, num_channels*J, track)
     self.conv = nn.Conv2d(num_channels*J, num_features, 1)
     self.act = get_activation_function(activation_name)