colgreen / sharpneat

SharpNEAT - Evolution of Neural Networks. A C# .NET Framework.
https://sharpneat.sourceforge.io/
Other
372 stars 95 forks source link

Insufficient NetworkXmlIO GetActivationFunction #24

Closed smelfungus closed 6 years ago

smelfungus commented 6 years ago

Hi there! Thank you for that amazing project. Looks like NetworkXmlIO.cs#L534 GetActivationFunction(string name) needs more registered functions such as TanH, LeakyReLU etc to handle. Maybe it would be suitable to create single place to register all supported IActivationFunctions with their aliases as some type of map? Thank you!

colgreen commented 6 years ago

Maybe it would be suitable to create single place to register all supported IActivationFunctions with their aliases as some type of map

Yes, I agree. This will be the approach in sharpneat-refactor, for the current code base I have just updated the switch statement.

Thanks for reporting.