Skip to content

Commit e2bc4e8

Browse files
update docstring
Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com>
1 parent 9c91491 commit e2bc4e8

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/layers/upsample.jl

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
"""
2-
Upsample(mode = :nearest; scale = nothing, size = nothing)
2+
Upsample(mode = :nearest; [scale, size])
33
4-
An upsampling layer.
4+
An upsampling layer. One of two keywords must be given:
55
6-
`scale` is a number or a tuple of numbers
7-
representing the output rescaling factor along each spatial dimension.
8-
For integer `scale`, all but the last 2 dimensions (channel and batch)
9-
will be rescaled by the same factor.
10-
11-
It is also possible to directly specify the output spatial `size`,
12-
as an alternative to using `scale`.
6+
If `scale` is a number, this applies to all but the last two dimensions (channel and batch) of the input.
7+
It may also be a tuple, to control dimensions individually. Alternatively, keyword
8+
`size` accepts a tuple, to directly specify the leading dimensions of the output.
139
1410
Currently supported upsampling `mode`s
1511
and corresponding NNlib's methods are:
@@ -78,4 +74,3 @@ struct PixelShuffle
7874
end
7975

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

0 commit comments

Comments
 (0)