From e7688a05a194e3c8baf3c11fbf09b7f5e8640a77 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Wed, 06 May 2015 21:08:16 +0000
Subject: [PATCH] no idea

---
 src/network.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/network.c b/src/network.c
index 75c9454..3247a31 100644
--- a/src/network.c
+++ b/src/network.c
@@ -186,6 +186,9 @@
     if(net.types[net.n-1] == COST){
         return ((cost_layer *)net.layers[net.n-1])->output[0];
     }
+    if(net.types[net.n-1] == DETECTION){
+        return ((detection_layer *)net.layers[net.n-1])->cost[0];
+    }
     return 0;
 }
 
@@ -500,6 +503,18 @@
     return get_network_input_size_layer(net, 0);
 }
 
+detection_layer *get_network_detection_layer(network net)
+{
+    int i;
+    for(i = 0; i < net.n; ++i){
+        if(net.types[i] == DETECTION){
+            detection_layer *layer = (detection_layer *)net.layers[i];
+            return layer;
+        }
+    }
+    return 0;
+}
+
 image get_network_image_layer(network net, int i)
 {
     if(net.types[i] == CONVOLUTIONAL){

--
Gitblit v1.10.0