src/cost_layer.c
@@ -45,6 +45,17 @@ return l; } void resize_cost_layer(cost_layer *l, int inputs) { l->inputs = inputs; l->outputs = inputs; l->delta = realloc(l->delta, inputs*l->batch*sizeof(float)); #ifdef GPU cuda_free(l->delta_gpu); l->delta_gpu = cuda_make_array(l->delta, inputs*l->batch); #endif } void forward_cost_layer(cost_layer l, network_state state) { if (!state.truth) return;