Skip to content

Commit a53b0f9

Browse files
committed
Fix docstrings for different conv layers
Fix docstrings for different conv layers
1 parent 9a8eb8a commit a53b0f9

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/layers/basic.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ function applychain(layers::AbstractVector, x) # type-unstable path, helps comp
6868
x
6969
end
7070

71-
# Overrides Base.getindex to obtain a `Chain` with selected layers
72-
# from a `Chain` passed to it.
7371
Base.getindex(c::Chain, i::AbstractArray) = Chain(c.layers[i])
7472
Base.getindex(c::Chain{<:NamedTuple}, i::AbstractArray) =
7573
Chain(NamedTuple{keys(c)[i]}(Tuple(c.layers)[i]))
@@ -79,7 +77,6 @@ function Base.show(io::IO, c::Chain)
7977
print(io, ")")
8078
end
8179

82-
# supporting methods for the overriden `Base.show` function
8380
_show_layers(io, layers::Tuple) = join(io, layers, ", ")
8481
_show_layers(io, layers::NamedTuple) = join(io, ["$k = $v" for (k, v) in pairs(layers)], ", ")
8582
_show_layers(io, layers::AbstractVector) = (print(io, "["); join(io, layers, ", "); print(io, "]"))

src/layers/conv.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ Note that `pad=SamePad()` here tries to ensure `size(output,d) == size(x,d) * st
213213
Parameters are controlled by additional keywords, with defaults
214214
`init=glorot_uniform` and `bias=true`.
215215
216-
ConvTranspose layer can also be constructed with given weights and biases.
217-
While constructung a ConvTranspose layer by providing weights and biases, the layer accepts the
218-
same keywords (and has the same defaults) as the `ConvTranspose((4,4), 3 => 7, relu)` method.
216+
ConvTranspose layer can also be manually constructed with passing in weights and
217+
biases. This constructor accepts the same keywords (and has the same defaults) as the
218+
`ConvTranspose((4,4), 3 => 7, relu)` method.
219219
220220
See also [`Conv`](@ref) for more detailed description of keywords.
221221
@@ -352,9 +352,9 @@ specifying the size of the convolutional kernel;
352352
Parameters are controlled by additional keywords, with defaults
353353
`init=glorot_uniform` and `bias=true`.
354354
355-
CrossCor layer can also be constructed with given weights and biases.
356-
While constructung a CrossCor layer by providing weights and biases, the layer accepts the
357-
same keywords (and has the same defaults) as the `CrossCor((4,4), 3 => 7, relu)` method.
355+
CrossCor layer can also be manually constructed with passing in weights and
356+
biases. This constructor accepts the layer accepts the same keywords (and has
357+
the same defaults) as the `CrossCor((4,4), 3 => 7, relu)` method.
358358
359359
See also [`Conv`](@ref) for more detailed description of keywords.
360360

0 commit comments

Comments
 (0)