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

Different activation functions #27

Closed
philiiiiiipp opened this issue Aug 26, 2016 · 6 comments
Closed

Different activation functions #27

philiiiiiipp opened this issue Aug 26, 2016 · 6 comments
Milestone

Comments

@philiiiiiipp
Copy link

Hey,

first of, cool work :-)! As far as I see it brain.js is currently using a sigmoid/logistic activation function. I think it would be quite beneficial to.

  1. Document that this one is used
  2. Create different ones

I could implement some of them like tanH which are working in the range of (0,1) which is currently used as output.

@robertleeplummerjr
Copy link
Contributor

I'm currently working on implementing tanH in the recurrent branch:
Forward propigate a matrix: https://github.com/harthur-org/brain.js/blob/recurrent/lib/recurrent/matrix/tanh.js
Backpropagate a matrix: https://github.com/harthur-org/brain.js/blob/recurrent/lib/recurrent/matrix/tanh-b.js

Currently is 90% or so working (weights aren't zeroing out and result in infinity after a few runs) and will be done soon (maybe a week or two?) I think after I make headway there, I can address this.

@robertleeplummerjr
Copy link
Contributor

Just fyi, have not forgotten. A minor surgery and a bunch of planning later, this is still on the board.

@robertleeplummerjr
Copy link
Contributor

Also, pull requests are always welcome.

@robertleeplummerjr
Copy link
Contributor

Booya! https://github.com/harthur-org/brain.js/tree/other-activation-functions
Doesn't yet work, but the most of the methods and math is there.

@robertleeplummerjr
Copy link
Contributor

#87

Would you be so kind as to give a code review and any insights?

@robertleeplummerjr
Copy link
Contributor

example:

const net = new brain.NeuralNetwork({
  activation: 'leaky-relu'
});

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

No branches or pull requests

2 participants