From 989ab8c38a02fa7ea9c25108151736c62e81c972 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 24 Apr 2015 17:27:50 +0000
Subject: [PATCH] IOU loss function

---
 src/detection_layer.h |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/detection_layer.h b/src/detection_layer.h
index e7e9e20..0aa5f66 100644
--- a/src/detection_layer.h
+++ b/src/detection_layer.h
@@ -1,12 +1,18 @@
 #ifndef DETECTION_LAYER_H
 #define DETECTION_LAYER_H
 
+#include "params.h"
+
 typedef struct {
     int batch;
     int inputs;
     int classes;
     int coords;
+    int background;
     int rescore;
+    int nuisance;
+    int does_cost;
+    float *cost;
     float *output;
     float *delta;
     #ifdef GPU
@@ -15,14 +21,15 @@
     #endif
 } detection_layer;
 
-detection_layer *make_detection_layer(int batch, int inputs, int classes, int coords, int rescore);
-void forward_detection_layer(const detection_layer layer, float *in, float *truth);
-void backward_detection_layer(const detection_layer layer, float *in, float *delta);
+detection_layer *make_detection_layer(int batch, int inputs, int classes, int coords, int rescore, int background, int nuisance);
+void forward_detection_layer(const detection_layer layer, network_state state);
+void backward_detection_layer(const detection_layer layer, network_state state);
 int get_detection_layer_output_size(detection_layer layer);
+int get_detection_layer_locations(detection_layer layer);
 
 #ifdef GPU
-void forward_detection_layer_gpu(const detection_layer layer, float *in, float *truth);
-void backward_detection_layer_gpu(detection_layer layer, float *in, float *delta);
+void forward_detection_layer_gpu(const detection_layer layer, network_state state);
+void backward_detection_layer_gpu(detection_layer layer, network_state state);
 #endif
 
 #endif

--
Gitblit v1.10.0