Last active
December 11, 2017 16:47
-
-
Save owulveryck/ebe63b6094a848244fd08cd2b8b44766 to your computer and use it in GitHub Desktop.
utf8 in golang...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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