Comments (2)
I have checked that AutoGrad can work with ArrayFire: JuliaGPU/ArrayFire.jl#183
PS: if my benchmark was correct then KnetArray is about 3-4 times faster.
from autograd.jl.
autograd gradient is working now (julia 0.7 and CuArrays master) but it is of the wrong type (standard array)
julia> using Knet,CuArrays, Statistics
julia> x,y = rand(13,10), randn(1,10)
([0.774427 0.275647 … 0.452615 0.09355; 0.411376 0.765637 … 0.527263 0.839156; … ; 0.650629 0.404082 … 0.520125 0.279594; 0.743382 0.192372 … 0.756798 0.457104], [-0.816243 -0.606755 … 1.3648 -0.116751])
julia> w = Any[ 0.1f0*cu(randn(Float32,1,13)), 0.0f0 ]
2-element Array{Any,1}:
Float32[-0.092651 -0.0714096 … -0.102493 0.080609]
0.0f0
julia> w[1] |> typeof
CuArray{Float32,2}
julia> predict(w,x) = w[1]*x .+ w[2]
predict (generic function with 1 method)
julia> loss(w,x,y) = mean(abs2, y.- predict(w,x))
loss (generic function with 1 method)
julia> loss(w,x,y)
0.7325428950542855
julia> grad(loss)(w,x,y)
2-element Array{Any,1}:
[0.215699 0.272719 … 0.196543 0.123026]
0.4017888307995154
julia> grad(loss)(w,x,y)[1] |> typeof
Array{Float64,2}
from autograd.jl.
Related Issues (20)
- grad doesn't work on trivial identity HOT 6
- Copy of param is value of param HOT 3
- bug in gradient with broadcast HOT 3
- cannot take derivative of a scalar function HOT 6
- Atom can’t evaluate a line which the regular REPL can
- Inside `@diff`, shouldn't `similar(Result{Array})` return `Result{Array}`? HOT 1
- mapslices and Param wrapped arrays
- Extend UngetIndex to multiple indices, values for efficiency HOT 1
- Autograd.Sparse type causes regression HOT 10
- getindex gradient collection bug
- Cannot `convert` an object of type UnitRange{Int64} to an object of type Colon
- Multiple functions sharing some gradients HOT 1
- Problems with grad after grad HOT 2
- Alkan bias add problem? HOT 1
- TagBot trigger issue HOT 2
- how to calculate gradient without calculating function outputs
- keyword args in broadcasted funcs not supported
- Param(x) as AbstractArray? HOT 1
- Incorrect derivatives when new arrays are constructed in computation
- AutoGrad and CUDA kernels HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autograd.jl.