Skip to content

Commit

Permalink
move one line to solve order-of-loading issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed Oct 23, 2024
1 parent 0bc7dad commit 3e09cb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/layers/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function _applychain(layers::AbstractVector, x) # type-unstable path, helps com
end
x
end
_show_pre_post(::Chain{<:AbstractVector}) = "Chain([", "])" # internal method for show

Base.getindex(c::Chain, i::AbstractArray) = Chain(c.layers[i])
Base.getindex(c::Chain{<:NamedTuple}, i::AbstractArray) =
Expand Down
2 changes: 1 addition & 1 deletion src/layers/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function _big_show(io::IO, obj, indent::Int=0, name=nothing)
end

_show_pre_post(obj) = string(nameof(typeof(obj)), "("), ")"
_show_pre_post(::Chain{<:AbstractVector}) = "Chain([", "])"
# _show_pre_post(::Chain{<:AbstractVector}) = "Chain([", "])" # has to be done elsewhere
_show_pre_post(::AbstractVector) = "[", "]"
_show_pre_post(::NamedTuple) = "(;", ")"

Check warning on line 58 in src/layers/show.jl

View check run for this annotation

Codecov / codecov/patch

src/layers/show.jl#L58

Added line #L58 was not covered by tests

Expand Down

0 comments on commit 3e09cb3

Please sign in to comment.