# Display full details of objects in notebook

Evaluating cells such as

i = NetEncoder[{"Image", {64, 64}, ColorSpace -> "Grayscale"}]
NetChain[{
ConvolutionLayer[32, 5],
Ramp,
PoolingLayer[2]
}, "Input" -> i]


always produces

where as what I need is the open view

, at least for the NetChain.

Is there a way to always display full details?

For neural networks, you can do

NeuralNetworksPrivate\$ExpandNetSummaryBoxByDefault = True;


to open them by default.

For most other types of summary boxes, you can use the following:

prot = Unprotect@BoxFormArrangeSummaryBox;
DownValues@BoxFormArrangeSummaryBox = DownValues@BoxFormArrangeSummaryBox /.
HoldPattern@DynamicModule[
{open_ = False, rest__},
body_
] :> DynamicModule[
{open = True, rest},
body
];
Protect /@ prot


This changes the default state of the generated boxes from closed to open.

• Is there a way of doing this for any summary box without messing with its internals? I am ok to evaluate an additional function on a closed result each time. – Cetin Sert Dec 9 '19 at 21:53
• As far as I know, no. The issue is that the state is stored inside a DynamicModuleBox, and I don't thinks it's feasible to get the variable and set it after the fact, without even worse messing with the front-end internals... – Lukas Lang Dec 9 '19 at 22:04
• @CetinSert you can add a formatting wrapper that would introduce this rule only temporarily. Basically define some function: MakeBoxes[OpenedSummaryBoxes[e], form_]:=InternalInheritedBlock[{BoxFormArrangeSummaryBox}, <<lucas's code >>; MakeBoxes[e, form]` – b3m2a1 Dec 10 '19 at 5:29