Relax! Flux is the ML library that doesn't make you tensor
Go to file
bors[bot] 22d5e318e5
Merge #1192
1192: Improve `restructure` performance r=dhairyagandhi96 a=MikeInnes

A small change, but it significantly improves the performance on the following test case:

```julia
julia> VERSION
v"1.5.0-DEV.876"

julia> using Flux, DiffEqFlux, BenchmarkTools

julia> using Flux: mse

julia> fastdense = FastDense(784, 32, tanh);

julia> p = initial_params(fastdense);

julia> dense = Dense(784, 32, tanh);

julia> p,re = Flux.destructure(dense);

julia> x = rand(Float32, 784, 10);

julia> y = rand(Float32, 32, 10);

julia> @btime gradient((x,p) -> mse(fastdense(x, p), y), x, p);
  505.530 μs (87 allocations: 240.73 KiB)

julia> @btime gradient((x,p) -> mse(re(p)(x), y), x, p);
  107.796 μs (139 allocations: 340.94 KiB)
```

Co-authored-by: Mike J Innes <mike.j.innes@gmail.com>
2020-06-05 14:53:11 +00:00
.github Update pull_request_template.md 2020-05-27 12:12:13 +01:00
docs Merge #1208 2020-06-05 09:17:12 +00:00
paper use https instead of http for web links 2019-04-25 11:04:03 +00:00
src improved restructure adjoint 2020-05-27 12:28:22 +01:00
test Merge #1177 2020-05-21 14:33:20 +00:00
.gitattributes Restore purity 2019-09-08 16:15:35 +01:00
.gitignore modernize documentation 2019-01-10 15:06:11 +01:00
.gitlab-ci.yml test on julia 1.3+ 2020-01-13 13:45:40 +05:30
.travis.yml yaml syntax fix 2020-05-04 18:01:33 +05:30
CITATION.bib Create CITATION.bib 2019-05-04 18:49:19 -04:00
LICENSE.md Update LICENSE.md 2019-04-15 16:59:16 -04:00
Manifest.toml CompatHelper: add new compat entry for "Functors" at version "0.1" 2020-05-13 00:13:46 +00:00
NEWS.md add news 2020-05-19 16:34:28 +05:30
Project.toml Merge #1133 2020-05-15 17:15:07 +00:00
README.md Update README.md 2019-12-19 09:44:17 -05:00
bors.toml bump version to 10.1 2020-01-13 13:41:25 +05:30

README.md

Build Status DOI

Flux is an elegant approach to machine learning. It's a 100% pure-Julia stack, and provides lightweight abstractions on top of Julia's native GPU and AD support. Flux makes the easy things easy while remaining fully hackable.

] add Flux

See the documentation or the model zoo for examples.

If you use Flux in your research, please cite our work.