Created
November 3, 2017 12:53
-
-
Save SimonDanisch/e41829654401466bda848e0c4b0f17bc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
using CLArrays | |
Wx = CLArray(rand(100)) | |
y = CLArray(rand(100)) | |
b = CLArray(rand(100)) | |
σ(x) = 1 / (1 + exp(-x)) | |
# this will get fused to a single kernel call: | |
y .= σ.(Wx .+ b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment