Skip to content

Commit

Permalink
pkg up
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeInnes committed Sep 19, 2019
1 parent fc9db7e commit b60df53
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 21 deletions.
20 changes: 11 additions & 9 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ version = "0.6.2"

[[CUDAapi]]
deps = ["Libdl", "Logging"]
git-tree-sha1 = "9b2b4b71d6b7f946c9689bb4dea03ff92e3c7091"
git-tree-sha1 = "e063efb91cfefd7e6afd92c435d01398107a500b"
uuid = "3895d2a7-ec45-59b8-82bb-cfc6a382f9b3"
version = "1.1.0"
version = "1.2.0"

[[CUDAdrv]]
deps = ["CUDAapi", "Libdl", "Printf"]
Expand Down Expand Up @@ -147,9 +147,9 @@ uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[FFTW]]
deps = ["AbstractFFTs", "BinaryProvider", "Conda", "Libdl", "LinearAlgebra", "Reexport", "Test"]
git-tree-sha1 = "03f8776fbdae28c20c0d1d2ae4e090cd1dfcd247"
git-tree-sha1 = "6c5b420da0b8c12098048561b8d58f81adea506f"
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
version = "1.0.0"
version = "1.0.1"

[[FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays"]
Expand All @@ -170,9 +170,9 @@ version = "0.10.3"

[[GPUArrays]]
deps = ["Adapt", "FFTW", "FillArrays", "LinearAlgebra", "Printf", "Random", "Serialization", "StaticArrays", "Test"]
git-tree-sha1 = "b5009ac44b141ded5e6f04c4db83807970f56e91"
git-tree-sha1 = "77e27264276fe97a7e7fb928bf8999a145abc018"
uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
version = "1.0.2"
version = "1.0.3"

[[IRTools]]
deps = ["InteractiveUtils", "MacroTools", "Test"]
Expand Down Expand Up @@ -388,14 +388,16 @@ version = "0.8.3"

[[Zygote]]
deps = ["DiffRules", "FFTW", "FillArrays", "ForwardDiff", "IRTools", "InteractiveUtils", "LinearAlgebra", "MacroTools", "NNlib", "NaNMath", "Random", "Requires", "SpecialFunctions", "Statistics", "ZygoteRules"]
git-tree-sha1 = "ce6d7142d665b1e4c71c678fa7db4da3bbc6743f"
git-tree-sha1 = "38241b40ebd8748bcacad5e6c7ba3ab3cc7a15c9"
repo-rev = "master"
repo-url = "https://github.com/FluxML/Zygote.jl.git"
uuid = "e88e6eb3-aa80-5325-afca-941959d7151f"
version = "0.3.4"

[[ZygoteRules]]
deps = ["MacroTools"]
git-tree-sha1 = "def5f96ac2895fd9b48435f6b97020979ee0a4c6"
git-tree-sha1 = "c4c29b30b8ff3be13d4244e78be7df2a42bc54d0"
repo-rev = "master"
repo-url = "https://github.com/FluxML/ZygoteRules.jl.git"
uuid = "700de1a5-db45-46bc-99cf-38207098b444"
version = "0.1.0"
version = "0.2.0"
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"

[compat]
CUDAapi = "1.1"
Expand Down
2 changes: 1 addition & 1 deletion src/Flux.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using Base: tail
using Zygote, MacroTools, Juno, Reexport, Statistics, Random
using MacroTools: @forward
@reexport using NNlib
using Zygote: Params, @adjoint, gradient, forward
using Zygote: Params, @adjoint, gradient, pullback
export gradient

export Chain, Dense, Maxout, RNN, LSTM, GRU, Conv, CrossCor, ConvTranspose, MaxPool, MeanPool,
Expand Down
10 changes: 5 additions & 5 deletions test/cuda/cudnn.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Flux, CuArrays, Test
using Flux: forward
using Flux: pullback

@testset "CUDNN BatchNorm" begin
@testset "4D Input" begin
Expand All @@ -8,8 +8,8 @@ using Flux: forward
cx = gpu(x)
cm = gpu(m)

y, back = forward((m, x) -> m(x), m, x)
cy, cback = forward((m, x) -> m(x), cm, cx)
y, back = pullback((m, x) -> m(x), m, x)
cy, cback = pullback((m, x) -> m(x), cm, cx)

@test cpu(cy) y

Expand All @@ -28,8 +28,8 @@ using Flux: forward
cx = gpu(x)
cm = gpu(m)

y, back = forward((m, x) -> m(x), m, x)
cy, cback = forward((m, x) -> m(x), cm, cx)
y, back = pullback((m, x) -> m(x), m, x)
cy, cback = pullback((m, x) -> m(x), cm, cx)

@test cpu(cy) y

Expand Down
6 changes: 3 additions & 3 deletions test/cuda/curnn.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Flux, CuArrays, Test
using Flux: forward
using Flux: pullback

@testset for R in [RNN, GRU, LSTM]
m = R(10, 5) |> gpu
Expand All @@ -22,8 +22,8 @@ end
rand(10, batch_size)
cux = gpu(x)

y, back = forward((r, x) -> (r(x)), rnn, x)
cuy, cuback = forward((r, x) -> (r(x)), curnn, cux)
y, back = pullback((r, x) -> (r(x)), rnn, x)
cuy, cuback = pullback((r, x) -> (r(x)), curnn, cux)

@test y collect(cuy)
@test haskey(Flux.CUDA.descs, curnn.cell)
Expand Down
4 changes: 2 additions & 2 deletions test/layers/normalisation.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Flux, Test, Statistics
using Zygote: forward
using Zygote: pullback

trainmode(f, x...) = forward(f, x...)[1]
trainmode(f, x...) = pullback(f, x...)[1]
trainmode(f) = (x...) -> trainmode(f, x...)

@testset "Dropout" begin
Expand Down
2 changes: 1 addition & 1 deletion test/layers/stateless.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ϵ = 1e-7
y = rand(T, 2)
ŷ = rand(T, 2)
for f in (mse, crossentropy, logitcrossentropy)
fwd, back = Flux.forward(f, ŷ, y)
fwd, back = Flux.pullback(f, ŷ, y)
@test fwd isa T
@test eltype(back(one(T))[1]) == T
end
Expand Down

0 comments on commit b60df53

Please sign in to comment.