From 91cdea3b269d02c36e6a64b6806d6c012fd5e47f Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 10 Mar 2018 04:06:42 +0100 Subject: [PATCH] fix inequalities in HardClip oldest trick in the book --- onn/activation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onn/activation.py b/onn/activation.py index 5bbae0d..69b18f4 100644 --- a/onn/activation.py +++ b/onn/activation.py @@ -219,4 +219,4 @@ class HardClip(Layer): # aka HardTanh when at default settings return np.clip(X, self.lower, self.upper) def backward(self, dY): - return dY * ((self.X <= self.lower) & (self.X >= self.upper)) + return dY * ((self.X >= self.lower) & (self.X <= self.upper))