Fixed memory leak in DLL, added load_image() & free_image(), added read_names_from_file()

This commit is contained in:
AlexeyAB
2017-03-16 21:49:36 +03:00
parent ed56fbbc90
commit 351996d9f0
4 changed files with 99 additions and 45 deletions

View File

@ -28,8 +28,8 @@ void free_layer(layer l)
#ifdef GPU
if(l.indexes_gpu) cuda_free((float *)l.indexes_gpu);
if(l.weights_gpu) cuda_free(l.weights_gpu);
if(l.weight_updates_gpu) cuda_free(l.weight_updates_gpu);
//if(l.weights_gpu) cuda_free(l.weights_gpu); // duplicated
//if(l.weight_updates_gpu) cuda_free(l.weight_updates_gpu); // duplicated
if(l.col_image_gpu) cuda_free(l.col_image_gpu);
if(l.weights_gpu) cuda_free(l.weights_gpu);
if(l.biases_gpu) cuda_free(l.biases_gpu);