Skip to content

Add weight-trap histogram plotting helpers and integrate into WW checkpoint plots#47

Open
charlesmartin14 wants to merge 1 commit intomainfrom
codex/add-histogram-and-weight-analysis-plots
Open

Add weight-trap histogram plotting helpers and integrate into WW checkpoint plots#47
charlesmartin14 wants to merge 1 commit intomainfrom
codex/add-histogram-and-weight-analysis-plots

Conversation

@charlesmartin14
Copy link
Copy Markdown
Member

Motivation

  • Provide visual diagnostics for dominant weight values ("traps") in converted weight matrices alongside existing WeightWatcher outputs to aid analysis of training checkpoints.

Description

  • Import matplotlib.pyplot and add _extract_weight_matrix to obtain 2D weight arrays from layer objects.
  • Add _dominant_weight_values to pick top unique weight magnitudes and plot_trap_lines_on_weight_histogram to draw trap vertical lines and labels on a weight histogram, plus wrapper plot_removed_traps_on_weight_histogram.
  • Introduce TRAP_HIST_MAX_LINES and call plot_trap_lines_on_weight_histogram for W2, W7, and W8 when make_ww_plots is enabled, saving figures to the round plot directory.

Testing

  • No automated tests were added or executed for this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant