From cb1f33c6ae840e8dc0f43518daf76e6ed01034f0 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Mon, 08 Dec 2014 19:48:57 +0000
Subject: [PATCH] Fixed race condition in server
---
src/cost_layer.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cost_layer.c b/src/cost_layer.c
index 6614b94..6951956 100644
--- a/src/cost_layer.c
+++ b/src/cost_layer.c
@@ -52,6 +52,7 @@
}
}
*(layer.output) = dot_cpu(layer.batch*layer.inputs, layer.delta, 1, layer.delta, 1);
+ //printf("cost: %f\n", *layer.output);
}
void backward_cost_layer(const cost_layer layer, float *input, float *delta)
@@ -74,7 +75,6 @@
void mask_ongpu(int n, cl_mem x, cl_mem mask, int mod)
{
- cl_setup();
cl_kernel kernel = get_mask_kernel();
cl_command_queue queue = cl.queue;
@@ -105,7 +105,7 @@
cl_read_array(layer.delta_cl, layer.delta, layer.batch*layer.inputs);
*(layer.output) = dot_cpu(layer.batch*layer.inputs, layer.delta, 1, layer.delta, 1);
- //printf("%f\n", *layer.output);
+ //printf("cost: %f\n", *layer.output);
}
void backward_cost_layer_gpu(const cost_layer layer, cl_mem input, cl_mem delta)
--
Gitblit v1.10.0