From fe4f01b1d8cce9762e47aaf42b6e17a3427a144b Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Tue, 20 Mar 2018 19:10:46 +0000
Subject: [PATCH] Fixed uses of WebCam for OpenCV 3.x

---
 src/layer.h |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/src/layer.h b/src/layer.h
index 341e58a..3a0e03d 100644
--- a/src/layer.h
+++ b/src/layer.h
@@ -34,6 +34,7 @@
     XNOR,
     REGION,
     REORG,
+	REORG_OLD,
     BLANK
 } LAYER_TYPE;
 
@@ -41,6 +42,18 @@
     SSE, MASKED, SMOOTH
 } COST_TYPE;
 
+typedef struct {
+	int batch;
+	float learning_rate;
+	float momentum;
+	float decay;
+	int adam;
+	float B1;
+	float B2;
+	float eps;
+	int t;
+} update_args;
+
 struct layer{
     LAYER_TYPE type;
     ACTIVATION activation;
@@ -63,10 +76,12 @@
     int out_h, out_w, out_c;
     int n;
     int max_boxes;
+	int small_object;
     int groups;
     int size;
     int side;
     int stride;
+    int reverse;
     int pad;
     int sqrt;
     int flip;
@@ -82,6 +97,7 @@
     float exposure;
     float shift;
     float ratio;
+	int focal_loss;
     int softmax;
     int classes;
     int coords;
@@ -94,7 +110,18 @@
     int reorg;
     int log;
 
+    int adam;
+    float B1;
+    float B2;
+    float eps;
+    float *m_gpu;
+    float *v_gpu;
+    int t;
+    float *m;
+    float *v;
+
     tree *softmax_tree;
+    int  *map;
 
     float alpha;
     float beta;
@@ -104,8 +131,14 @@
     float object_scale;
     float noobject_scale;
     float class_scale;
+    int bias_match;
     int random;
+    float thresh;
+    int classfix;
+    int absolute;
 
+    int onlyforward;
+    int stopbackward;
     int dontload;
     int dontloadscales;
 
@@ -223,6 +256,9 @@
     float * weights_gpu;
     float * weight_updates_gpu;
 
+	float * weights_gpu16;
+	float * weight_updates_gpu16;
+
     float * biases_gpu;
     float * bias_updates_gpu;
 
@@ -237,6 +273,7 @@
     #ifdef CUDNN
     cudnnTensorDescriptor_t srcTensorDesc, dstTensorDesc;
     cudnnTensorDescriptor_t dsrcTensorDesc, ddstTensorDesc;
+	cudnnTensorDescriptor_t normTensorDesc;
     cudnnFilterDescriptor_t weightDesc;
     cudnnFilterDescriptor_t dweightDesc;
     cudnnConvolutionDescriptor_t convDesc;

--
Gitblit v1.10.0