[mlpack-git] [mlpack/mlpack] NeuralEvolution - implemented gene, genome (#686)

Marcus Edel notifications at github.com
Tue Jun 7 17:55:52 EDT 2016


> +
> +      // Loop neurons to calculate neurons' activation.
> +      for (unsigned in j=aNumInput; j<aNeuronGenes.size(); ++j) {
> +        double x = aNeuronGenes[j].aInput;  // TODO: consider bias. Difference?
> +        aNeuronGenes[j].aInput = 0;
> +
> +        double y = 0;
> +        switch (aNeuronGenes[j].Type()) { // TODO: revise the implementation.
> +          case SIGMOID:                   // TODO: more cases.
> +            y = sigmoid(x);
> +            break;
> +          case RELU:
> +            y = relu(x);
> +            break;
> +          default:
> +            y = sigmoid(x);

I don't think it's a good idea, to reimplement the activation function or to keep a copy in the ne module. For a couple of reasons:

- it would increase maintenance
- if there is a bug in one of the activation functions we probably have to fix the same activation function twice
- we have to rewrite the tests that are already existing for all ann activation functions
- if we implement a non-existing activation function for one of the evolution methods, we can also use the function for the ann modules

Also, since we have this neat update policy, we don't go and change API's between two versions. So if we change something there should be enough time, for adaptation.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/686/files/3c8aa62b951f029b3883e9baef1ea556ef5af2d3#r66160291
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160607/ccf2375b/attachment.html>


More information about the mlpack-git mailing list