Skip to content

Commit 8f11ab8

Browse files
committed
change to use Base.summarysize
1 parent 7f54144 commit 8f11ab8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/layers/show.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function _big_show(io::IO, obj, indent::Int=0)
2424
end
2525
if indent == 0
2626
print(io, ")")
27-
_big_finale(io, params(obj))
27+
_big_finale(io, obj)
2828
else
2929
println(io, " "^indent, "),")
3030
end
@@ -60,10 +60,11 @@ function _layer_show(io::IO, layer, indent::Int=0)
6060
indent==0 || println(io)
6161
end
6262

63-
function _big_finale(io::IO, ps)
63+
function _big_finale(io::IO, m)
64+
ps = params(m)
6465
if length(ps) > 2
6566
pars = underscorise(sum(length, ps))
66-
bytes = Base.format_bytes(sum(sizeof, ps))
67+
bytes = Base.format_bytes(Base.summarysize(m))
6768
printstyled(io, " "^19, "# Total: ", length(ps), " arrays, ", pars, " parameters, ", bytes; color=:light_black)
6869
end
6970
end

0 commit comments

Comments
 (0)