Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Created January 27, 2018 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NMZivkovic/553b8c3dc6049d95968805923a9a7e61 to your computer and use it in GitHub Desktop.
Save NMZivkovic/553b8c3dc6049d95968805923a9a7e61 to your computer and use it in GitHub Desktop.
public class StepActivationFunction : IActivationFunction
{
private double _treshold;
public StepActivationFunction(double treshold)
{
_treshold = treshold;
}
public double CalculateOutput(double input)
{
return Convert.ToDouble(input > _treshold);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment