Skip to content

Instantly share code, notes, and snippets.

@SimonDanisch
Created November 3, 2017 12:53
Show Gist options
  • Save SimonDanisch/e41829654401466bda848e0c4b0f17bc to your computer and use it in GitHub Desktop.
Save SimonDanisch/e41829654401466bda848e0c4b0f17bc to your computer and use it in GitHub Desktop.
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