executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
neural-networksUse PyGAD's pure NumPy neural helpers and Keras/Torch adapters for GA-based model optimization.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task asks to evolve neural-network weights with PyGAD: pure NumPy dense networks, pure NumPy CNNs, GANN/GACNN populations, or Keras/PyTorch model adapters.
pygad.GA tuning, custom operators, batch fitness, callbacks, or multi-objective selectors: use genetic-algorithm.benchmarks.results-and-visuals.| User goal | PyGAD module path | Dependency profile | Notes |
|---|---|---|---|
| Small dense network in NumPy | pygad.nn + pygad.gann | Core PyGAD only | Best for transparent examples and tiny classification/regression tasks. |
| Small CNN in NumPy | pygad.cnn + pygad.gacnn | Core PyGAD only | CPU-only forward pass; keep fixtures tiny. |
| Existing Keras model | pygad.kerasga | tensorflow/keras extra | Supports Sequential and Functional models; only trainable layer weights enter the chromosome. |
| Existing PyTorch model | pygad.torchga | torch extra | Works from state_dict() order; predictions use a copied model so the caller model is preserved. |
torch.nn.Module.GANN.population_networks plus population_as_vectors(), GACNN.population_networks, KerasGA.population_weights, or TorchGA.population_weights as initial_population.(ga_instance, solution, solution_idx) and return a higher-is-better score. For Keras/Torch, load the candidate solution through the adapter's predict() or restore helper inside fitness; for GANN/GACNN, predict from the matching population model and synchronize matrices in on_generation.pygad.GA. Start with few generations, small populations, explicit random_seed, and a simple maximization score before scaling to expensive data.predict() helper.results-and-visuals after the GA is complete.nn, gann, cnn, and gacnn conversion paths with tiny deterministic data.0 to num_classes - 1.