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

added ReLU #1

Merged
merged 4 commits into from
Dec 17, 2018
Merged

added ReLU #1

merged 4 commits into from
Dec 17, 2018

Conversation

twhughes
Copy link
Member

@twhughes twhughes commented Dec 6, 2018

I added a (discontinuous) ReLU activation of the form

  f(x_i) = alpha * x_i   if |x_i| <  cutoff
  f(x_i) = x_i                if |x_i| >= cutoff

This activation is nice because it has the property f(z)/z = f'(z), which means the backprop step can be done by simply propagating the error signal through the same system as the forward prop activation.

I want to test whether this activation can be useful in real problems.

Added tests, which passed.

@twhughes twhughes requested a review from bencbartlett December 6, 2018 18:47
Copy link
Member

@bencbartlett bencbartlett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and passes tests, but this doesn't seem like ReLU? ReLU is continuous but not differentiable at 0 (or whatever the threshold is), this seems to have a discontinuity at cutoff.

neuroptica/nonlinearities.py Outdated Show resolved Hide resolved
neuroptica/nonlinearities.py Outdated Show resolved Hide resolved
@bencbartlett bencbartlett merged commit 673bc98 into master Dec 17, 2018
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.

2 participants