Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

softplus activation #12

Open
edgarriba opened this issue Apr 7, 2017 · 1 comment
Open

softplus activation #12

edgarriba opened this issue Apr 7, 2017 · 1 comment

Comments

@edgarriba
Copy link

@vdumoulin I'm a bit confused about why are you using softplus activation** for the discriminator since in the paper formulas there no mention or at least I cannot recognize it.

**https://github.com/IshmaelBelghazi/ALI/blob/master/ali/bricks.py#L69-L72

BTW, @vdumoulin we met at your talk in the CVC during the break time :D

@vdumoulin
Copy link
Collaborator

Nice to talk to you again! :) This is a numerically stable version of -log(sigmoid(x)):

-log(sigmoid(x)) = -log(1 / (1 + exp(-x))) = log(1 + exp(-x)) = softplus(-x)

Normally the substitution would happen automatically at the optimization stage of compiling the Theano function, but I encountered situations in the past where this was not triggered, so I use the numerically stable version directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants