Skip to content

Commit

Permalink
update docstring
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com>
  • Loading branch information
CarloLucibello and mcabbott authored Feb 10, 2021
1 parent 9c91491 commit e2bc4e8
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/layers/upsample.jl
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
"""
Upsample(mode = :nearest; scale = nothing, size = nothing)
Upsample(mode = :nearest; [scale, size])
An upsampling layer.
An upsampling layer. One of two keywords must be given:
`scale` is a number or a tuple of numbers
representing the output rescaling factor along each spatial dimension.
For integer `scale`, all but the last 2 dimensions (channel and batch)
will be rescaled by the same factor.
It is also possible to directly specify the output spatial `size`,
as an alternative to using `scale`.
If `scale` is a number, this applies to all but the last two dimensions (channel and batch) of the input.
It may also be a tuple, to control dimensions individually. Alternatively, keyword
`size` accepts a tuple, to directly specify the leading dimensions of the output.
Currently supported upsampling `mode`s
and corresponding NNlib's methods are:
Expand Down Expand Up @@ -78,4 +74,3 @@ struct PixelShuffle
end

(m::PixelShuffle)(x) = NNlib.pixel_shuffle(x, m.r)

0 comments on commit e2bc4e8

Please sign in to comment.