add Arcsinh activation

This commit is contained in:
Connor Olding 2018-03-07 01:29:48 +01:00
parent 8ce2ec1ad4
commit 0641c747c9

View file

@ -197,3 +197,12 @@ class CubicGB(Layer):
def backward(self, dY):
# this gradient is intentionally incorrect.
return dY
class Arcsinh(Layer):
def forward(self, X):
self.X = X
return np.arcsinh(X)
def backward(self, dY):
return dY / np.sqrt(self.X * self.X + 1)