Merge pull request #639 from ropenta/master

Added an example of Conv to Flux.jl/src/layers/conv.jl, and clarified…
This commit is contained in:
Mike J Innes 2019-02-25 14:35:38 +00:00 committed by GitHub
commit d6cf116a74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,8 +12,17 @@ expand(N, i::Integer) = ntuple(_ -> i, N)
Standard convolutional layer. `size` should be a tuple like `(2, 2)`.
`in` and `out` specify the number of input and output channels respectively.
Data should be stored in WHCN order. In other words, a 100×100 RGB image would
be a `100×100×3×1` array, and a batch of 50 would be a `100×100×3×50` array.
Example: Applying Conv layer to a 1-channel input using a 2x2 window size,
giving us a 16-channel output. Output is activated with ReLU.
size = (2,2)
in = 1
out = 16
Conv((2, 2), 1=>16, relu)
Data should be stored in WHCN order (width, height, # channels, # batches).
In other words, a 100×100 RGB image would be a `100×100×3×1` array,
and a batch of 50 would be a `100×100×3×50` array.
Takes the keyword arguments `pad`, `stride` and `dilation`.
"""