neat-python icon indicating copy to clipboard operation
neat-python copied to clipboard

Vectorization

Open TheMightiestCarrot opened this issue 3 years ago • 5 comments

Hello,

are there plans to vectorize FeedForwardNetwork.activate function? So activate function would accept matrix instead of an array.

Thanks.

TheMightiestCarrot avatar Feb 18 '22 15:02 TheMightiestCarrot

Probably not, at least not in the near term. I am working on an example with custom genes that generates a PyTorch network, so if that might be relevant for the situation you're thinking about, keep an eye out for that in the next week or two.

CodeReclaimers avatar May 04 '22 22:05 CodeReclaimers

maybe you will find this repo helpful: https://github.com/uber-research/PyTorch-NEAT

TheMightiestCarrot avatar May 05 '22 07:05 TheMightiestCarrot

Thanks! Hopefully, I can find time to incorporate some ideas from that project. I would like to support HyperNEAT and its variants if possible, or at least provide some tools to export neat-python networks into forms that can be evaluated in more high-performance tools/frameworks like PyTorch.

CodeReclaimers avatar May 05 '22 12:05 CodeReclaimers

also this bottleneck happens when trying to scale NEAT (1280 population on 128 cores), the GA operations seems to be slower than evalutation of fitness function (guess the GA operations are not parallelized), i dont know whether its even possible to solve that image the peaks are fitness evalutation

TheMightiestCarrot avatar May 06 '22 13:05 TheMightiestCarrot

This genome distance + speciation operation bottleneck has made me think more than once about ditching the "pure Python with no dependencies" rule I've stuck with so far. :)

I've made a note to take a stab at parallelizing the speciation.

CodeReclaimers avatar May 06 '22 14:05 CodeReclaimers