HyperCodec / neat

Crate for implementing NeuroEvolution of Augmenting Topologies
MIT License
4 stars 1 forks source link

Add activation fn registry system #34

Closed HyperCodec closed 5 months ago

HyperCodec commented 5 months ago

Allows for activation functions to be registered so that the deserialization step can work with other types of activation fns.

HyperCodec commented 5 months ago

for some reason the macro wants to compile error now and I'm not sure what changed to make it start erroring when it didn't before

HyperCodec commented 5 months ago

^ maybe ambiguous commit names by accident but the first one solved some of the annoying stuff with the macro and the second one fixed rayon feature compile errors

HyperCodec commented 5 months ago

This technically works but still want to make sure it is able to access and use the registry when generating/mutating and maybe do the "separate flag" thing from #17

HyperCodec commented 5 months ago

The problem with the current activation functions system is the macro uses the path passed to it and directly stringifies it, probably want something more like the full typepath of the function to prevent some ambiguous user errors.

HyperCodec commented 5 months ago

The ActivationScope::INPUT and ActivationScope::OUTPUT flags are currently not really used, as I am manually assigning the activation during generation and not changing it anywhere except hidden layer. This may change in the future.

HyperCodec commented 5 months ago

Everything looks good, the serde test passes, so I think I can merge.