addind a mask to the weight matrix (faster than vector of parameters and sparse representation)
 progress