fix inequalities in HardClip
oldest trick in the book
This commit is contained in:
parent
a6519f5455
commit
91cdea3b26
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue