From a08ef29e085236f13fd04246c6774f9682a56208 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 10 Jul 2015 23:38:14 +0000
Subject: [PATCH] NIGHTMARE!!!!
---
src/activations.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/activations.c b/src/activations.c
index 8b607c2..d31b1e4 100644
--- a/src/activations.c
+++ b/src/activations.c
@@ -22,6 +22,8 @@
return "tanh";
case PLSE:
return "plse";
+ case LEAKY:
+ return "leaky";
default:
break;
}
@@ -36,6 +38,7 @@
if (strcmp(s, "plse")==0) return PLSE;
if (strcmp(s, "linear")==0) return LINEAR;
if (strcmp(s, "ramp")==0) return RAMP;
+ if (strcmp(s, "leaky")==0) return LEAKY;
if (strcmp(s, "tanh")==0) return TANH;
fprintf(stderr, "Couldn't find activation function %s, going with ReLU\n", s);
return RELU;
@@ -54,6 +57,8 @@
return relie_activate(x);
case RAMP:
return ramp_activate(x);
+ case LEAKY:
+ return leaky_activate(x);
case TANH:
return tanh_activate(x);
case PLSE:
@@ -83,6 +88,8 @@
return relie_gradient(x);
case RAMP:
return ramp_gradient(x);
+ case LEAKY:
+ return leaky_gradient(x);
case TANH:
return tanh_gradient(x);
case PLSE:
--
Gitblit v1.10.0