-
-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some small printing upgrades (#2344)
* some printing upgrades * print eltype too * move one line to solve order-of-loading issue * better fix * tests, and Fix1
- Loading branch information
Showing
3 changed files
with
76 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,13 @@ end | |
# [email protected] marks transposed matrices non-leaf, shouldn't affect printing: | ||
adjoint_chain = repr("text/plain", Chain([Dense([1 2; 3 4]')])) | ||
@test occursin("Dense(2 => 2)", adjoint_chain) | ||
@test occursin("Chain([", adjoint_chain) | ||
@test occursin("Chain(", adjoint_chain) | ||
@test occursin("[", adjoint_chain) | ||
|
||
# New printing of arrays, and Fix1 | ||
fix_chain = repr("text/plain", Chain(Base.Fix1(*, rand32(22,33)), softmax)) | ||
@test occursin("Fix1(", fix_chain) | ||
@test occursin("22×33 Matrix{Float32}", fix_chain) | ||
end | ||
|
||
# Bug when no children, https://github.com/FluxML/Flux.jl/issues/2208 | ||
|