Skip to content

Instantly share code, notes, and snippets.

@juliuskittler
Created September 22, 2019 06:42
Show Gist options
  • Select an option

  • Save juliuskittler/cf65d4567fdba8cfdf4b159db337a332 to your computer and use it in GitHub Desktop.

Select an option

Save juliuskittler/cf65d4567fdba8cfdf4b159db337a332 to your computer and use it in GitHub Desktop.
par(mfrow=c(5,2), mar=c(2,2,2,2))
curve(1 / (1 + exp(-x)), from = -10, to = 10, main = "sigmoid(x)")
curve(10 / (1 + exp(-x)), from = -10, to = 10, main = "10*sigmoid(x)")
curve(tanh(x), from = -10, to = 10, main = "tanh(x)")
curve(exp(x) / sum(exp(x)), from = -10, to = 10, main = "softmax(x)")
curve(pmax(0, x), from = -10, to = 10, main = "rectifier(x)")
curve(log(1 + exp(x)), from = -10, to = 10, main = "softplus(x)")
curve(sign(x), from = -10, to = 10, main = "sign(x)")
curve(floor(x), from = -10, to = 10, main = "floor(x)")
curve(round(x), from = -10, to = 10, main = "round(x)")
curve(ceiling(x), from = -10, to = 10, main = "ceiling(x)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment