         }
     }
 
-    res_inf_cst[n] = inf_cst + expr_inf_cst[n];
-    res_sup_cst[n] = sup_cst + expr_sup_cst[n];
+    res_inf_cst[n] = inf_cst;
+    res_sup_cst[n] = sup_cst;
 }
 
 
 __global__
 void device_layer_create_sparse_exprs(float_type* dense_coeff, float_type* bias, const float_type* filter_weights,
-                                      const float_type* filter_bias, const size_t input_size_x, const size_t input_size_y, const size_t input_size_z, const size_t output_size_x, const size_t output_size_y, const size_t output_size_z, const size_t filter_size_x, const size_t filter_size_y,
+                                      const float_type* filter_bias, const size_t input_size_x, const size_t input_size_y, const size_t input_size_z, const size_t filter_size_x, const size_t filter_size_y,
                                       const size_t stride_x, const size_t stride_y, const long int pad_x, const long int pad_y, const size_t num_pixels)
 {
     size_t out_x = blockIdx.x;
     size_t out_y = blockIdx.y;
     size_t out_z = blockIdx.z;
 
-    const size_t mat_x = out_x*output_size_y*output_size_z + out_y*output_size_z + out_z;
+    const size_t mat_x = out_x*gridDim.y*gridDim.z + out_y*gridDim.z + out_z;
 
     for(size_t x_shift = 0; x_shift < filter_size_x; x_shift++)
     {



__global__
void compute_lb_from_expr_conv_sparse(float_type* __restrict__ lb_array, const float_type* __restrict__ inf_coeff, const float_type* __restrict__ sup_coeff, const float_type* __restrict__ inf_cst, const float_type* __restrict__ input_inf, const float_type* __restrict__ input_sup, const size_t num_out_neurons_last_layer, const size_t output_size_x, const size_t output_size_y, const size_t output_size_z, long int offset_x, long int offset_y, long int length_x, long int length_y, long int shift_x, long int shift_y)
{
    const size_t last_x = blockIdx.x;
    const size_t last_y = blockIdx.y;



__global__
void uexpr_replace_relu_bounds(float_type* __restrict__ inf_coeff, float_type* __restrict__ sup_coeff, float_type* __restrict__ inf_cst, float_type* __restrict__ sup_cst, const float_type* __restrict__ lb_array, const float_type* __restrict__ ub_array, const size_t num_out_neurons_current_layer)
{
    const size_t n = blockIdx.x;
    const size_t i = blockIdx.y*blockDim.x + threadIdx.x;
