Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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