From 35cc0aaa15b991b348cc8d9623eed5d4f8a1e435 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Fri, 30 Mar 2018 12:51:54 +0000
Subject: [PATCH] Added max_boxes for yolo v3
---
src/yolo_layer.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/yolo_layer.c b/src/yolo_layer.c
index 2925b26..1ec04b8 100644
--- a/src/yolo_layer.c
+++ b/src/yolo_layer.c
@@ -10,7 +10,7 @@
#include <string.h>
#include <stdlib.h>
-layer make_yolo_layer(int batch, int w, int h, int n, int total, int *mask, int classes)
+layer make_yolo_layer(int batch, int w, int h, int n, int total, int *mask, int classes, int max_boxes)
{
int i;
layer l = {0};
@@ -38,7 +38,9 @@
l.bias_updates = calloc(n*2, sizeof(float));
l.outputs = h*w*n*(classes + 4 + 1);
l.inputs = l.outputs;
- l.truths = 90*(4 + 1);
+ l.max_boxes = max_boxes;
+ printf(" l.max_boxes = %d \n", l.max_boxes);
+ l.truths = l.max_boxes*(4 + 1); // 90*(4 + 1);
l.delta = calloc(batch*l.outputs, sizeof(float));
l.output = calloc(batch*l.outputs, sizeof(float));
for(i = 0; i < total*2; ++i){
--
Gitblit v1.10.0