Skip to content

Commit

Permalink
improve example
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed Oct 11, 2023
1 parent 78cec03 commit 75744f9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/noshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ Chain(
Dense(9 => 10), # 100 parameters
) # Total: 8 arrays, 145 parameters, 1.191 KiB.
julia> PseudoLayer((i,o)::Pair) = Parallel(+, Dense(i => o, relu), Dense(i => o, tanh));
julia> PseudoLayer((i,o)::Pair) = NoShow(
"PseudoLayer(\$i => \$o)",
Parallel(+, Dense(i => o, relu), Dense(i => o, tanh)),
)
PseudoLayer (generic function with 1 method)
julia> mid = PseudoLayer(3 => 10);
julia> Chain(Dense(2 => 3), NoShow("PseudoLayer(3 => 10)", mid), Dense(9 => 10))
julia> Chain(Dense(2 => 3), PseudoLayer(3 => 10), Dense(9 => 10))
Chain(
Dense(2 => 3), # 9 parameters
PseudoLayer(3 => 10), # 80 parameters
Expand Down

0 comments on commit 75744f9

Please sign in to comment.