code: def createSparseCNNModel(self):
      
      # Create sparseCNN2 model
      model = nn.Sequential(
        nn.Conv2d(in_channels=self.in_channels, out_channels=self.out_channels[0],
                  kernel_size=self.kernel_size[0], stride=self.stride[0],
                  padding=self.padding[0]),
        nn.MaxPool2d(kernel_size=2),
        KWinners2d(n=self.cnn_output_len[0], k=self.cnn_k[0],
                   channels=self.out_channels[0],
                   kInferenceFactor=self.k_inference_factor,
                   boostStrength=self.boost_strength,
                   boostStrengthFactor=self.boost_strength_factor),
  
        nn.Conv2d(in_channels=self.out_channels[0], out_channels=self.out_channels[1],
                  kernel_size=self.kernel_size[1], stride=self.stride[1],
                  padding=self.padding[1]),
        nn.MaxPool2d(kernel_size=2),
        KWinners2d(n=self.cnn_output_len[1], k=self.cnn_k[1],
                   channels=self.out_channels[1],
                   kInferenceFactor=self.k_inference_factor,
                   boostStrength=self.boost_strength,
                   boostStrengthFactor=self.boost_strength_factor),
  
        Flatten(),
  
        SparseWeights(
          nn.Linear(self.cnn_output_len[1], self.n), self.weight_sparsity),
        KWinners(n=self.n, k=self.k, kInferenceFactor=self.k_inference_factor,
                 boostStrength=self.boost_strength,
                 boostStrengthFactor=self.boost_strength_factor),
  
        nn.Linear(self.n, self.output_size),
        nn.LogSoftmax(dim=1)
      )
  
      model.to(self.device)
      if torch.cuda.device_count() > 1:
        model = torch.nn.DataParallel(model)
  
      return model
docs: Create a sparse network composed of two CNN / MaxPool layers followed by a
      sparse linear layer with using k-winner activation between the layers