From ebf1d7a73b0d996378de17606425d77a6cea166b Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Fri, 6 Dec 2019 03:46:34 +0300 Subject: [PATCH] Minor fixes --- src/classifier.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/classifier.c b/src/classifier.c index b7976c45..5545f96e 100644 --- a/src/classifier.c +++ b/src/classifier.c @@ -209,14 +209,22 @@ void train_classifier(char *datacfg, char *cfgfile, char *weightfile, int *gpus, destroy_all_windows_cv(); #endif - free_network(net); - free_ptrs((void**)labels, classes); + pthread_join(load_thread, 0); + free_data(buffer); + + //free_network(net); + for (i = 0; i < ngpus; ++i) free_network(nets[i]); + free(nets); + + //free_ptrs((void**)labels, classes); + free(labels); free_ptrs((void**)paths, plist->size); free_list(plist); free(base); free_list_contents_kvp(options); free_list(options); + }