Skip to content

Commit

Permalink
Default activation function changed from LogisticFunctionSteep to Lea…
Browse files Browse the repository at this point in the history
…kyReLU or the following experiments: BinaryElevenMultiplexerExperiment, BinarySixMultiplexerExperiment, BinaryThreeMultiplexerExperiment, GenerativeFnRegressionExperiment, Xor.

This is based on evidence that LeakyReLU leads to better performance on these experiments; see http://sharpneat.sourceforge.net/research/activation-fn-review/activation-fn-review.html
  • Loading branch information
colgreen committed Feb 4, 2018
1 parent 2d5c0a1 commit f1ebd83
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using SharpNeat.EvolutionAlgorithms;
using SharpNeat.EvolutionAlgorithms.ComplexityRegulation;
using SharpNeat.Genomes.Neat;
using SharpNeat.Network;
using SharpNeat.Phenomes;
using SharpNeat.SpeciationStrategies;

Expand Down Expand Up @@ -133,6 +134,7 @@ public void Initialize(string name, XmlElement xmlConfig)
_eaParams.SpecieCount = _specieCount;
_neatGenomeParams = new NeatGenomeParameters();
_neatGenomeParams.FeedforwardOnly = _activationScheme.AcyclicNetwork;
_neatGenomeParams.ActivationFn = LeakyReLU.__DefaultInstance;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using SharpNeat.EvolutionAlgorithms;
using SharpNeat.EvolutionAlgorithms.ComplexityRegulation;
using SharpNeat.Genomes.Neat;
using SharpNeat.Network;
using SharpNeat.Phenomes;
using SharpNeat.SpeciationStrategies;

Expand Down Expand Up @@ -133,6 +134,7 @@ public void Initialize(string name, XmlElement xmlConfig)
_eaParams.SpecieCount = _specieCount;
_neatGenomeParams = new NeatGenomeParameters();
_neatGenomeParams.FeedforwardOnly = _activationScheme.AcyclicNetwork;
_neatGenomeParams.ActivationFn = LeakyReLU.__DefaultInstance;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using SharpNeat.EvolutionAlgorithms;
using SharpNeat.EvolutionAlgorithms.ComplexityRegulation;
using SharpNeat.Genomes.Neat;
using SharpNeat.Network;
using SharpNeat.Phenomes;
using SharpNeat.SpeciationStrategies;

Expand Down Expand Up @@ -133,6 +134,7 @@ public void Initialize(string name, XmlElement xmlConfig)
_eaParams.SpecieCount = _specieCount;
_neatGenomeParams = new NeatGenomeParameters();
_neatGenomeParams.FeedforwardOnly = _activationScheme.AcyclicNetwork;
_neatGenomeParams.ActivationFn = LeakyReLU.__DefaultInstance;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using SharpNeat.EvolutionAlgorithms;
using SharpNeat.EvolutionAlgorithms.ComplexityRegulation;
using SharpNeat.Genomes.Neat;
using SharpNeat.Network;
using SharpNeat.Phenomes;
using SharpNeat.SpeciationStrategies;

Expand Down Expand Up @@ -138,6 +139,7 @@ public void Initialize(string name, XmlElement xmlConfig)

_neatGenomeParams = new NeatGenomeParameters();
_neatGenomeParams.FeedforwardOnly = _activationScheme.AcyclicNetwork;
_neatGenomeParams.ActivationFn = LeakyReLU.__DefaultInstance;

// Determine what function to regress.
string fnIdStr = XmlUtils.GetValueAsString(xmlConfig, "Function");
Expand Down
2 changes: 2 additions & 0 deletions src/SharpNeatDomains/Xor/XorExperiment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using SharpNeat.EvolutionAlgorithms;
using SharpNeat.EvolutionAlgorithms.ComplexityRegulation;
using SharpNeat.Genomes.Neat;
using SharpNeat.Network;
using SharpNeat.Phenomes;
using SharpNeat.SpeciationStrategies;

Expand Down Expand Up @@ -133,6 +134,7 @@ public void Initialize(string name, XmlElement xmlConfig)
_eaParams.SpecieCount = _specieCount;
_neatGenomeParams = new NeatGenomeParameters();
_neatGenomeParams.FeedforwardOnly = _activationScheme.AcyclicNetwork;
_neatGenomeParams.ActivationFn = LeakyReLU.__DefaultInstance;
}

/// <summary>
Expand Down

0 comments on commit f1ebd83

Please sign in to comment.