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

Marcus Edel notifications at github.com
Mon Jul 4 15:51:43 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() {

Yeah, right.

I did some testing, and encounter an unexpected behaviour. This are the modifications I made: https://gist.github.com/zoq/181c036cb4b903f8e7cb2977639ee6b8

I've also, printed the activation function type in CalcActivation(), which is the RELU function, but I expected it to be SIGMOID, do we randomly choose the activation function, somewhere? The seed genome uses the SIGMOID for all neurons except for the BIAS neuron.

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


More information about the mlpack-git mailing list