X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=folded-ctf.git;a=blobdiff_plain;f=parsing_pool.cc;h=f12a377c06366357b046e532c56dd493ec0efb9c;hp=696477a30f642f08b50802c86081cf79ff9d3497;hb=ccc2785ee823c934edcededc5c6448e4f9488f8b;hpb=82c3a0366dd58ea2b3a2fc3f90be3f1a42ac8341 diff --git a/parsing_pool.cc b/parsing_pool.cc index 696477a..f12a377 100644 --- a/parsing_pool.cc +++ b/parsing_pool.cc @@ -88,6 +88,7 @@ void ParsingPool::down_one_level(LossMachine *loss_machine, PoseCellHierarchy *h loss_machine->subsample(_nb_cells, labels, tmp_responses, _nb_negative_cells, sample_nb_occurences, sample_responses, 1); + c = 0; for(int i = 0; i < _nb_images; i++) { for(int d = 0; d < _parsings[i]->nb_cells(); d++) { @@ -119,6 +120,9 @@ void ParsingPool::down_one_level(LossMachine *loss_machine, PoseCellHierarchy *h delete[] sample_responses; delete[] sample_nb_occurences; + + delete[] labels; + delete[] tmp_responses; } void ParsingPool::update_cell_responses(PiFeatureFamily *pi_feature_family, @@ -200,8 +204,6 @@ void ParsingPool::weighted_sampling(LossMachine *loss_machine, s = 0; c = 0; -// global.bar.init(&cout, _nb_images); - for(int i = 0; i < _nb_images; i++) { int *to_collect = new int[_parsings[i]->nb_cells()]; @@ -221,12 +223,8 @@ void ParsingPool::weighted_sampling(LossMachine *loss_machine, delete[] to_collect; c += _parsings[i]->nb_cells(); - -// global.bar.refresh(&cout, i); } -// global.bar.finish(&cout); - delete[] tmp_responses; delete[] labels; }