Comments (5)
It turns out I was still using Julia v0.6.0-rc3 (the final release candidate just before the v0.6.0 release), just updated to Julia v0.6.0 and now I can reproduce it. AFAICT, that means it was JuliaLang/julia@e5e8be2 that introduced the bug here. I'll dig through that commit tomorrow. Thanks again for finding this!
Maybe it's something about my GPU? I don't think I have CUDA libraries b/c when I ran Pkg.update() last time Tensorflow complained about it:
ReverseDiff doesn't automatically run anything on the GPU; it falls back to however array operations are defined on your input array type.
from reversediff.jl.
I can't reproduce this...here's what I'm getting on my end (using ReverseDiff v0.1.4, the latest version):
julia> using ReverseDiff
julia> f(X) = sum([if x > 0; x else 0 end for x in X])
f (generic function with 1 method)
julia> ReverseDiff.gradient(f, [2,3,-1])
3-element Array{Int64,1}:
1
1
0
I'll close this since it seems to be fixed on the latest ReverseDiff version, but please let me know if you encounter any issues with this.
from reversediff.jl.
Huh, that is super weird. I just installed it again on a new machine, and I have v0.1.4
as well. I also just ran Pkg.update()
:
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0 (2017-06-19 13:05 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-apple-darwin13.4.0
julia> Pkg.update()
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove
julia> using ReverseDiff
julia> f(X) = sum([if x > 0; x else 0 end for x in X])
f (generic function with 1 method)
julia> ReverseDiff.gradient(f, [2,3,-1])
3-element Array{Int64,1}:
0
0
0
julia>
Maybe it's something to do with my machine? I'm on a 2017 13" MacBook Pro, macOS 10.12.5.
Maybe it's something about my GPU? I don't think I have CUDA libraries b/c when I ran Pkg.update()
last time Tensorflow complained about it:
INFO: Upgrading TensorFlow: v0.6.2 => v0.6.6
INFO: Building CUDAdrv
======================================================================[ ERROR: CUDAdrv ]======================================================================
LoadError: Could not find the CUDA driver library (specify the path to libcuda using the CUDA_DRIVER environment variable).
while loading /Users/nhdaly/.julia/v0.6/CUDAdrv/deps/build.jl, in expression starting on line 119
==============================================================================================================================================================
from reversediff.jl.
Also, for more context:
julia> Pkg.installed()["ReverseDiff"]
v"0.1.4"
julia> Pkg.installed()["ForwardDiff"]
v"0.4.2"
from reversediff.jl.
cool, glad to help! good luck!
from reversediff.jl.
Related Issues (20)
- Support for sparse TrackedArray
- ChainRulesCore projection & ReverseDiff.TrackedArray
- Interference with Distributed.jl on Windows HOT 23
- Missing Promotion Rule
- Custom `rrule` not working with ReverseDiff HOT 1
- Please use 'ReverseDiff.value' HOT 7
- Hypothetical: ReverseDiff or Analytical Derivative
- Get a error when calculating the gradient for LSTM
- Error when using scalar vs. vector to operate on tracked inupt HOT 1
- Record `Broadcast.broadcasted` instead of `Broadcast.broadcast`
- MethodError: ReverseDiff.TrackedReal ... is ambiguous.
- double free crash with multi-threaded code only when using multiple threads
- @grad_from_chainrules macro fails when using multi-output functions HOT 2
- ReverseDiff documentation shows issue that has been fixed? Nested differentiation of a closure? HOT 1
- `MethodError: *(::Diagonal, ::ReverseDiff.TrackedArray)` is ambiguous.
- `@grad_from_chainrules` hygiene: cannot use custom types in method signature HOT 3
- Define `typemin` for tracked reals.
- ReverseDiff defines a huge number of methods. HOT 3
- Nested differentiation of closures yields incorrect results. Any news on the fix?
- Enhancement proposal: Modular tape caching HOT 16
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 reversediff.jl.