fix Softplus derivative
This commit is contained in:
parent
c2bb2cfcd5
commit
7c4ef4ad05
|
@ -698,7 +698,7 @@ class Softplus(Layer):
|
||||||
return np.log(1 + np.exp(X))
|
return np.log(1 + np.exp(X))
|
||||||
|
|
||||||
def backward(self, dY):
|
def backward(self, dY):
|
||||||
return sigmoid(self.X)
|
return dY * sigmoid(self.X)
|
||||||
|
|
||||||
class Tanh(Layer):
|
class Tanh(Layer):
|
||||||
def forward(self, X):
|
def forward(self, X):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user