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

Excalibur notifications at github.com
Wed Jun 8 20:55:01 EDT 2016


> +    return aDepth;
> +  }
> +
> +  // Set neurons' input and output to zero.
> +  void Flush() {
> +    for (unsigned int i=0; i<aNeuronGenes.size(); ++i) {
> +      aNeuronGenes[i].aActivation = 0;
> +      aNeuronGenes[i].aInput = 0;
> +    }
> +  }
> +
> +  // 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);
> +    Flush();
> +

@zoq Yeah, seems reasonable. I add the Flush() step to make sure it will be correct for activation. But I also think it seems not a required step.

---
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#r66367462
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160608/da819309/attachment.html>


More information about the mlpack-git mailing list