Tanh
This activation function is very similar to sigmoid. The only difference is that the range of this function is [-1, 1]. And the equation used tanh
function.
PYTHON
1class TanhActivation():
2 def forward(X):
3 return np.tanh(X)
This activation function is very similar to sigmoid. The only difference is that the range of this function is [-1, 1]. And the equation used tanh
function.
f(x)=tanh(x)
1class TanhActivation():
2 def forward(X):
3 return np.tanh(X)