MCPcopy Create free account
hub / github.com/DFin/Neural-Network-Visualisation / parse_hidden_dims

Function parse_hidden_dims

training/mlp_train.py:129–133  ·  view source on GitHub ↗
(raw: Sequence[int])

Source from the content-addressed store, hash-verified

127
128
129def parse_hidden_dims(raw: Sequence[int]) -> list[int]:
130 dims = [int(d) for d in raw if int(d) > 0]
131 if not dims:
132 raise ValueError("At least one positive hidden dimension is required.")
133 return dims
134
135
136def capture_layer_snapshots(model: SmallMLP, activations: Sequence[str]) -> list[LayerSnapshot]:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected