From 5b6be00d4b1ffd671c20c4c72d2239c924eaa3d4 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Thu, 23 Aug 2018 12:28:34 +0000
Subject: [PATCH] Added yolov3-tiny_xnor.cfg
---
src/activations.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/activations.c b/src/activations.c
index 0cbb2f5..eab4e23 100644
--- a/src/activations.c
+++ b/src/activations.c
@@ -95,8 +95,16 @@
void activate_array(float *x, const int n, const ACTIVATION a)
{
int i;
- for(i = 0; i < n; ++i){
- x[i] = activate(x[i], a);
+ if (a == LINEAR) {}
+ else if (a == LEAKY) {
+ for (i = 0; i < n; ++i) {
+ x[i] = leaky_activate(x[i]);
+ }
+ }
+ else {
+ for (i = 0; i < n; ++i) {
+ x[i] = activate(x[i], a);
+ }
}
}
@@ -139,5 +147,5 @@
for(i = 0; i < n; ++i){
delta[i] *= gradient(x[i], a);
}
-}
+}
--
Gitblit v1.10.0