Relax! Flux is the ML library that doesn't make you tensor
Go to file
bors[bot] 19b45b49d3
Merge #1221
1221: DataLoader with NamedTuple r=CarloLucibello a=cossio

Just a couple of small changes, so that `DataLoader` can be created with a `NamedTuple` of tensors instead of `Tuple`. This way the tensors can be referred to by name. For example

```
train_loader = DataLoader((images = Xtrain, labels = Ytrain), batchsize=16)
batch = first(train_loader)
y = model(batch.images)
logitcrossentropy(y, batch.labels)
```

If we only use tuples, then in datasets with multiple tensors one has to be careful about the order in which the tensors are fed into the `DataLoader` constructor and be consistent with this elsewhere. With `NamedTuples` one just have to be consistent about the names used, which I think is a minor improvement.

CC @CarloLucibello 

### PR Checklist

- [x] Tests are added
- [x] Entry in NEWS.md
- [x] Documentation, if applicable

I don't think this qualifies as an API change. It's just a minor feature addition. So final review probably not required.

- [ ] Final review from `@MikeInnes` or `@dhairyagandhi96` (for API changes).


Co-authored-by: cossio <j.cossio.diaz@gmail.com>
Co-authored-by: cossio <cossio@users.noreply.github.com>
2020-06-16 17:21:28 +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 Merge #1221 2020-06-16 17:21:28 +00:00
test DataLoader type inference tests 2020-06-16 13:32:27 +02: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: bump compat for "Adapt" to "2.0" 2020-06-11 00:18:47 +00:00
NEWS.md news and docs 2020-06-16 13:32:27 +02:00
Project.toml Merge #1218 2020-06-15 15:21:21 +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.