Skip to content

CNN PR [4/4]: Add CNN training example - #896

Merged
sevmag merged 2 commits into
graphnet-team:mainfrom
sevmag:features/cnn-train-example
Nov 8, 2026
Merged

sevmag merged 2 commits into
graphnet-team:mainfrom
sevmag:features/cnn-train-example

Conversation

@sevmag

@sevmag sevmag commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fifth and final PR carved out of #813 (see the split tracking comment). Adds an end-to-end training example for the CNN models.

What's new

  • examples/04_training/09_train_cnn.py — builds an image data representation (ExamplePrometheusImage), feeds it to an LCSC backbone inside a StandardModel, and trains an EnergyReconstruction task on the bundled example data.

⚠️ Depends on #892, #894, #895 — draft until those merge

This example imports from all three earlier split PRs:

Because those base branches only exist in the fork, this PR targets main directly, so its current diff includes the files from #892/#894/#895 in addition to the net-new example. Once those merge into main, GitHub will narrow this diff to just examples/04_training/09_train_cnn.py.

Review/merge order: merge #892, #894, then #895 first; this PR is kept as a draft until then, after which it'll be rebased onto main and marked ready.

Test plan

  • Pre-commit clean (black reformatted, then all hooks pass)
  • python -m py_compile succeeds
  • Module-level imports resolve against the combined image-representation + CNN branches
  • CI green (after the dependency PRs merge)
  • Manual: run python examples/04_training/09_train_cnn.py on the bundled example data

Split from #813.

🤖 Generated with Claude Code

@sevmag sevmag mentioned this pull request May 27, 2026
@sevmag sevmag changed the title Add CNN training example CNN PR [3/4]: Add CNN training example May 27, 2026
@sevmag sevmag changed the title CNN PR [3/4]: Add CNN training example CNN PR [4/4]: Add CNN training example Jun 9, 2026
@sevmag
sevmag force-pushed the features/cnn-train-example branch 6 times, most recently from b8d0111 to 32e27fb Compare September 13, 2026 19:30

@Aske-Rosted Aske-Rosted left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@sevmag
sevmag marked this pull request as ready for review November 2, 2026 12:38
Add the LCSC convolutional backbone, building on the `CNN` base class.
Registered in `cnn/__init__.py` alongside `CNN` and `IceCubeDNN`.

Stacked on the CNN-base PR. Split from graphnet-team#813.
Add `examples/04_training/09_train_cnn.py`, an end-to-end training
example for the CNN models: it builds an image data representation
(`ExamplePrometheusImage`), feeds it to an `LCSC` backbone inside a
`StandardModel`, and trains an `EnergyReconstruction` task on the
bundled example data.

Depends on the image data representation and CNN model PRs. Split from
graphnet-team#813.
@sevmag
sevmag force-pushed the features/cnn-train-example branch from 32e27fb to a917d84 Compare November 7, 2026 17:23
@sevmag
sevmag merged commit ddc6f77 into graphnet-team:main Nov 8, 2026
12 checks passed
@sevmag
sevmag deleted the features/cnn-train-example branch November 9, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants