Hyperbolic function transformation in neural network

311 Views Asked by At

While I was trying to do a linear transform in neural, I met the following problem:

$$\tanh(ax+b)=\frac{(\tanh(\frac{x}{2})+1)}{2}$$

What is the appropriate $a$ and $b$?

Thanks

the original problem is that,

linearly transform the input to a sigmoid function $\frac{1}{1+e^{-a}}$ to fit the input of a tanh(a) function so that give the same result

1

There are 1 best solutions below

0
On

I know nothing about neural networks. My gf, however, does and she says (I quote):

$\tanh(ax+b)$ has a range $(-1,1)$. I assume the form you want, $\frac{(\tanh(\frac{x}{2})+1)}{2}$, is so you can restrict the range to $(0,1)$ to prevent the neurons from flipping their sign. For a generic $x$ (which I assume is the membrane potential of your neuron) there won't be $a$ and $b$ that satisfy this. However why not just use a nonlinearity in the form $\frac{(\tanh(\frac{x}{2})+1)}{2}$?