 
     if(num_chunks > 1)
     {
-        std::cout << "Number of chunks " << num_chunks << std::endl;
+        std::cout << "Number of chunks for residual " << num_chunks << std::endl;
     }
 
     return num_chunks;
 }
-*/
-
-
-    /*
-	neuron_t **neurons = fp->layers[fp->numlayers - 1]->neurons;
-	for(size_t i=0; i < num_neurons; i++){
-		double *coeff = (double*)malloc(sizeof(double));
-		coeff[0] = 1;
-		size_t *dim = (size_t*)malloc(sizeof(size_t));
-		dim[0] = i;
-		neurons[i]->expr = create_sparse_expr(coeff,0,dim,1);
-	}
-    */
+
+
 __global__
 void create_res_coeffs_csts(float_type* coeffs, float_type* bias, const size_t num_chunks, const size_t chunk_counter, const size_t input_size_z)
 {

    size_t out_z = blockIdx.z;

    const size_t local_mat_x = out_x*gridDim.y*gridDim.z + out_y*gridDim.z + out_z;
    //const size_t global_mat_x = out_x*gridDim.y*num_chunks*gridDim.z + out_y*num_chunks*gridDim.z + chunk_counter*gridDim.z + out_z;

    coeffs[local_mat_x*input_size_z + chunk_counter*gridDim.z + out_z] = 1;


    float_type* linf_cst_tmp;
    float_type* lsup_cst_tmp;

    cudaMalloc((void**) &linf_coeff_tmp, num_out_neurons_last_layer*sizeof(float_type));
    cudaMalloc((void**) &lsup_coeff_tmp, num_out_neurons_last_layer*sizeof(float_type));
    cudaMalloc((void**) &linf_cst_tmp, num_out_neurons_last_layer*sizeof(float_type));
    cudaMalloc((void**) &lsup_cst_tmp, num_out_neurons_last_layer*sizeof(float_type));

