From 1b5afb45838e603fa6780762eb8cc59246dc2d81 Mon Sep 17 00:00:00 2001
From: IlyaOvodov <b@ovdv.ru>
Date: Tue, 08 May 2018 11:09:35 +0000
Subject: [PATCH] Output improvements for detector results: When printing detector results, output was done in random order, obfuscating results for interpreting. Now: 1. Text output includes coordinates of rects in (left,right,top,bottom in pixels) along with label and score 2. Text output is sorted by rect lefts to simplify finding appropriate rects on image 3. If several class probs are > thresh for some detection, the most probable is written first and coordinates for others are not repeated 4. Rects are imprinted in image in order by their best class prob, so most probable rects are always on top and not overlayed by less probable ones 5. Most probable label for rect is always written first Also: 6. Message about low GPU memory include required amount
---
src/softmax_layer.h | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/softmax_layer.h b/src/softmax_layer.h
index 2275250..821a8dd 100644
--- a/src/softmax_layer.h
+++ b/src/softmax_layer.h
@@ -1,16 +1,19 @@
#ifndef SOFTMAX_LAYER_H
#define SOFTMAX_LAYER_H
+#include "layer.h"
+#include "network.h"
-typedef struct {
- int inputs;
- int batch;
- float *delta;
- float *output;
- float *jacobian;
-} softmax_layer;
+typedef layer softmax_layer;
-softmax_layer *make_softmax_layer(int batch, int inputs);
-void forward_softmax_layer(const softmax_layer layer, float *input);
-void backward_softmax_layer(const softmax_layer layer, float *input, float *delta);
+void softmax_array(float *input, int n, float temp, float *output);
+softmax_layer make_softmax_layer(int batch, int inputs, int groups);
+void forward_softmax_layer(const softmax_layer l, network_state state);
+void backward_softmax_layer(const softmax_layer l, network_state state);
+
+#ifdef GPU
+void pull_softmax_layer_output(const softmax_layer l);
+void forward_softmax_layer_gpu(const softmax_layer l, network_state state);
+void backward_softmax_layer_gpu(const softmax_layer l, network_state state);
+#endif
#endif
--
Gitblit v1.10.0