         }
     }
 
-    if(retain_bounds)
+    if(retain_training_data)
     {
         float_type* lcoeff_host = (float_type*) malloc(x_y_size_last_layer*num_filters_last_layer*length_x*length_y*fp->layers[0]->input_size[2]*sizeof(float_type));
         float_type* ucoeff_host = (float_type*) malloc(x_y_size_last_layer*num_filters_last_layer*length_x*length_y*fp->layers[0]->input_size[2]*sizeof(float_type));


    fp->layers[fp->numlayers - 1]->predecessors = predecessors;

    update_state_using_previous_layers_sparse(man, fp, fp->numlayers - 1, use_area_heuristic);
}



}


void update_state_using_previous_layers_sparse(elina_manager_t* man, fppoly_t* fp, const size_t layerno, const bool use_area_heuristic, const bool retain_training_data)
{
    const size_t num_chunks = predict_size(fp, layerno);

    for(size_t chunk_counter = 0; chunk_counter < num_chunks; chunk_counter++)
    {
        update_state_using_previous_layers_sparse(man, fp, fp->numlayers - 1, num_chunks, chunk_counter, use_area_heuristic, retain_training_data);
    }
}

