Skip to content

Instantly share code, notes, and snippets.

@owulveryck
Last active December 11, 2017 16:47
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 owulveryck/ebe63b6094a848244fd08cd2b8b44766 to your computer and use it in GitHub Desktop.
Save owulveryck/ebe63b6094a848244fd08cd2b8b44766 to your computer and use it in GitHub Desktop.
utf8 in golang...
package main
import (
"math"
"testing"
)
func σ(x float64) float64 {
return float64(1) / (1 + math.Exp(-x))
}
func TestMain(t *testing.T) {
wₐ := 0.0
y := σ(wₐ)
if y != 0.5 {
t.Fail()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment