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

Fix bug in BernoulliDropout #123

Merged
merged 1 commit into from Mar 21, 2016
Merged

Fix bug in BernoulliDropout #123

merged 1 commit into from Mar 21, 2016

Conversation

kaikaun
Copy link
Contributor

@kaikaun kaikaun commented Mar 2, 2016

Divide activations by (1-weight) rather than weight

Divide activations by (1-weight) rather than weight
@lmjohns3
Copy link
Owner

Can you explain why this is the correct scaling factor instead of just weight?

@kaikaun
Copy link
Contributor Author

kaikaun commented Mar 20, 2016

Consider the case where weight = 0.1. This means that 0.9 of the
activations remain, while 0.1 are zeroed out. In order for the total
activation to be on average the same as before, the remaining activations
are scaled up. The current code would scale them up by 10 times (i.e. 1 /
weight), which is wrong, since 0.9 of the activations remain -- the total
activation would now be on average 9 times the original. The correct
scaling is by 1 / 0.9, so you should be dividing by (1 - weight), not
weight.

In addition, I have been testing with the new (1 - weight) scaling in my
own application using my own fork, and I get much better performance both
in and out of sample.

Regards,
David Khoo

On 20 March 2016 at 12:46, Leif Johnson notifications@github.com wrote:

Can you explain why this is the correct scaling factor instead of just
weight?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#123 (comment)

@lmjohns3
Copy link
Owner

Ok, fantastic, thanks for the explanation!

lmjohns3 added a commit that referenced this pull request Mar 21, 2016
Fix bug in BernoulliDropout
@lmjohns3 lmjohns3 merged commit a0181f2 into lmjohns3:master Mar 21, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants