From b77a8f39874c05a1ed0cabd8d85134126ac2da47 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 28 Nov 2014 18:38:26 +0000
Subject: [PATCH] stable
---
src/cost_layer.h | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/cost_layer.h b/src/cost_layer.h
index edda8f9..2f1cd55 100644
--- a/src/cost_layer.h
+++ b/src/cost_layer.h
@@ -2,17 +2,24 @@
#define COST_LAYER_H
#include "opencl.h"
+typedef enum{
+ SSE, DETECTION
+} COST_TYPE;
+
typedef struct {
int inputs;
int batch;
float *delta;
float *output;
+ COST_TYPE type;
#ifdef GPU
cl_mem delta_cl;
#endif
} cost_layer;
-cost_layer *make_cost_layer(int batch, int inputs);
+COST_TYPE get_cost_type(char *s);
+char *get_cost_string(COST_TYPE a);
+cost_layer *make_cost_layer(int batch, int inputs, COST_TYPE type);
void forward_cost_layer(const cost_layer layer, float *input, float *truth);
void backward_cost_layer(const cost_layer layer, float *input, float *delta);
--
Gitblit v1.10.0