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

Marcus Edel notifications at github.com
Sat Jul 2 18:44:49 EDT 2016


> +    std::sort(depthAndLinks.begin(), depthAndLinks.end());
> +
> +    for (ssize_t i=0; i<linkGenesSize; ++i) {
> +      aLinkGenes[i] = depthAndLinks[i].link;
> +    }
> +  }
> +
> +  // Activate genome. The last dimension of input is always 1 for bias. 0 means no bias.
> +  void Activate(std::vector<double>& input) {
> +    assert(input.size() == aNumInput);
> +
> +    SortLinkGenes();
> +
> +    // Set all neurons' input to be 0.
> +    for (ssize_t i=0; i<NumNeuron(); ++i) {
> +      aNeuronGenes[i].Input(0);

If we reset the input, we also lose the input of a recurrent connection, for the next iteration.

---
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/554a279b0089e4385dfb40077e578d6ae2a42ece#r69383486
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160702/dab837bb/attachment-0001.html>


More information about the mlpack-git mailing list