 
         if(fp->layers[k]->type == CONV)
         {
-            cudaMalloc((void**) &aux_coeffs, fp->layers[k]->num_out_neurons*fp->layers[k]->num_in_neurons*sizeof(float_type));
-            cudaMalloc((void**) &aux_csts, fp->layers[k]->num_out_neurons*sizeof(float_type));
-
-            sparse_to_dense(fp->layers[k], aux_coeffs, aux_csts);
+            aux_coeffs = fp->layers[k]->filter_weights;
+            aux_csts = fp->layers[k]->filter_bias;
         }
         else
         {

                    continue;
                }

                if(out_x == 0 && out_y == 0 && out_z == 0)
                printf("%lu ", mat_y);

                //if(out_x == 1 && out_y == 1 && out_z == 0)
                //printf("%lu ", mat_y);

    float_type tmp1, tmp2;
    float_type maxRes, maxMul;

    if(x_shift*filter_size_y*input_size_z + y_shift*input_size_z + inp_z < filter_size_x*filter_size_y*input_size_z)
    {
        for(long int out_x = min_out_x; out_x < max_out_x; out_x++)
        {
            if((out_x < 0) || (out_x >= output_size_x))
            {
                continue;
            }

            for(long int out_y = min_out_y; out_y < max_out_y; out_y++)
            {
                if((out_y < 0 || out_y >= output_size_y))
                {
                    continue;
                }

                const long int x_val = out_x*stride_x + x_shift - pad_x;
                const long int y_val = out_y*stride_y + y_shift - pad_y;

                if(!((y_val < 0) || (y_val >= (long int)input_size_y)))
                {
                    if(!((x_val < 0) || (x_val >= (long int)input_size_x)))
                    {
                        const size_t mat_in = x_val*input_size_y*input_size_z + y_val*input_size_z + inp_z;
                        const size_t b = n*input_size_x*input_size_y*input_size_z + mat_in;

                        float_type inf_coeff = res_inf_coeff[b];
                        float_type sup_coeff = res_sup_coeff[b];

                        for(size_t out_z = 0; out_z < output_size_z; out_z++)
                        {
                            const size_t mat_out = out_x*output_size_y*output_size_z + out_y*output_size_z + out_z;
                            const size_t a = n*output_size_x*output_size_y*output_size_z + mat_out;

                            const float_type prev_inf_coeff = expr_inf_coeff[a];
                            const float_type prev_sup_coeff = expr_sup_coeff[a];

                            if((prev_inf_coeff != 0) || (prev_sup_coeff != 0))
                            {
                                const size_t filter_index = out_z*filter_size_x*filter_size_y*input_size_z + x_shift*filter_size_y*input_size_z + y_shift*input_size_z + inp_z;

                                const float_type aux_coeff = aux_coeffs[filter_index];
                                elina_double_interval_mul_expr_coeff(&tmp1, &tmp2, prev_inf_coeff, prev_sup_coeff, -aux_coeff, aux_coeff);

                                maxRes = fmax(fabs(inf_coeff), fabs(sup_coeff));
                                maxMul = fmax(fabs(tmp1), fabs(tmp2));

                                inf_coeff = inf_coeff + tmp1 + (maxRes + maxMul)*ulp;
                                sup_coeff = sup_coeff + tmp2 + (maxRes + maxMul)*ulp;
                            }
                        }

                        res_inf_coeff[b] = inf_coeff;
                        res_sup_coeff[b] = sup_coeff;
                    }
                }

                __syncthreads();
            }
        }
    }
