Merge branch 'master' into curnn

This commit is contained in:
Mike J Innes 2018-02-02 15:56:44 +00:00
commit b1c5786012
3 changed files with 3 additions and 2 deletions

View File

@ -32,4 +32,4 @@ m = mapleaves(cu, m)
d(cu(rand(10))) d(cu(rand(10)))
``` ```
The [mnist example](https://github.com/FluxML/model-zoo/blob/master/mnist/mnist.jl) contains the code needed to run the model on the GPU; just uncomment the lines after `using CuArrays`. The [mnist example](https://github.com/FluxML/model-zoo/blob/master/mnist/mlp.jl) contains the code needed to run the model on the GPU; just uncomment the lines after `using CuArrays`.

View File

@ -18,6 +18,7 @@ export σ, sigmoid, relu, leakyrelu, elu, swish, softmax, logsoftmax,
include("tracker/Tracker.jl") include("tracker/Tracker.jl")
using .Tracker using .Tracker
import .Tracker: data, value
include("optimise/Optimise.jl") include("optimise/Optimise.jl")
using .Optimise using .Optimise

View File

@ -65,7 +65,7 @@ value(x::TrackedScalar) = data(x)[]
Base.:(==)(x::TrackedArray, y) = value(x) == y Base.:(==)(x::TrackedArray, y) = value(x) == y
Base.:(==)(y, x::TrackedArray) = y == value(x) Base.:(==)(y, x::TrackedArray) = y == value(x)
Base.:(==)(x::TrackedArray, y::TrackedArray) = value(x) == value(x) Base.:(==)(x::TrackedArray, y::TrackedArray) = value(x) == value(y)
Base.isless(x::TrackedScalar, y) = isless(value(x), y) Base.isless(x::TrackedScalar, y) = isless(value(x), y)
Base.isless(x, y::TrackedScalar) = isless(x, value(y)) Base.isless(x, y::TrackedScalar) = isless(x, value(y))