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

Excalibur notifications at github.com
Sun Jul 3 13:41:06 EDT 2016


> +        ssize_t fromNeuronIdx = GetNeuronIndex(aLinkGenes[i].FromNeuronId());
> +        double input = aNeuronGenes[toNeuronIdx].Input() + 
> +                       aNeuronGenes[fromNeuronIdx].Activation() * aLinkGenes[i].Weight();
> +        aNeuronGenes[toNeuronIdx].Input(input);
> +        
> +        if (i == NumLink() - 1) {
> +          aNeuronGenes[toNeuronIdx].CalcActivation();
> +        } else if (GetNeuronIndex(aLinkGenes[i + 1].ToNeuronId()) != toNeuronIdx) {
> +          aNeuronGenes[toNeuronIdx].CalcActivation();
> +        }
> +      }
> +    }
> +  }
> +
> +  // Get output vector.
> +  std::vector<double> Output() {

Revised.

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


More information about the mlpack-git mailing list