Skip to content

Commit

Permalink
Add relu activation function
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMSPedersen committed Jun 10, 2019
1 parent a86257c commit e1e13fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/nn.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ let tanh = new ActivationFunction(
y => 1 - (y * y)
);

let tanh = new ActivationFunction(
x => (x<0)?0:x,
y => (x<0)?0:1
);


class NeuralNetwork {
/*
Expand Down

0 comments on commit e1e13fc

Please sign in to comment.