add Arcsinh activation
This commit is contained in:
parent
8ce2ec1ad4
commit
0641c747c9
1 changed files with 9 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue