2
$\begingroup$

$$\sigma(z) = \frac{e^x}{e^x + 1}$$

$$\sigma(z) = \frac{1}{e^{-x} + 1}$$

They are both the same but I'm unable to rewrite one to the other. I'm learning about neural networks for fun and I understand what it does. I find the first equation more intuitive to understand than the second equation, which is why I'd want to be able to understand how to rewrite it.

I have a couple of questions:

  1. How would I Google for this question? I think even in Dutch (my native language) I'd have trouble in this.

  2. How do you rewrite one equation to the other? I've seen a couple of blogs doing it, but I didn't save it. It involved some +1 and -1 trickery.

I don't know how to search for it. And it may be the case that this answer has already been answered on Stack Exchange, but I couldn't find it via Google. The search term scavenger hunt has taken 1 hour already.

$\endgroup$
2
  • 1
    $\begingroup$ Tip: $\LaTeX$ also works in titles. $\endgroup$ – Mohammad Zuhair Khan Feb 1 '19 at 11:18
  • 1
    $\begingroup$ I don't think you can Google this as it is not a real difficulty (just you needing a coffee ;-). $\endgroup$ – Yves Daoust Feb 1 '19 at 11:27
2
$\begingroup$

$\frac{a}{a+1}=\frac{a}{a(1+\frac{1}{a})}=\frac{1}{1+\frac{1}{a}}$. If $a=e^x$, then $ \frac{1}{a}=e^{-x}.$

Can you take it from here ?

$\endgroup$
1
  • $\begingroup$ Thanks I get it! Your solution shows a cool trick that $a+1 = a(1+\frac{1}{a})$, I didn't know that. I mean it makes sense, but to me it looks like the invention of the paper clip. Simple to use, hard to come up with. $\endgroup$ – Melvin Roest Feb 1 '19 at 11:17
2
$\begingroup$

Take $\sigma(z) = \frac{e^x}{e^x + 1}$, divide both numerator and denominator by $e^x$. You get $\sigma(z) = \frac{1}{e^{-x} + 1}$

$\endgroup$
1
  • $\begingroup$ Thanks I get it! I made a facepalm after reading and getting your answer :P $\endgroup$ – Melvin Roest Feb 1 '19 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.