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
optional-batch-generatorsRouter for imbalanced-learn balanced mini-batch helpers for Keras and TensorFlow.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task names balanced mini-batches, Keras, or TensorFlow support in imbalanced-learn.
This sub-skill owns the optional generator helpers:
imblearn.tensorflow.balanced_batch_generatorimblearn.keras.BalancedBatchGeneratorimblearn.keras.balanced_batch_generatorIt is intentionally narrower than a deep-learning training skill. It covers the balanced data iterator surface, not model architecture design, training loops, or GPU acceleration strategy.
tensorflow or keras is actually importable.Sequence,
or both.sample_indices_.balanced_batch_generatorBalancedBatchGeneratorkeras, tensorflow, Sequence, fitreferences/workflows.md for import and backend decision flow.references/api-reference.md for the compact generator catalog.references/troubleshooting.md when backend imports or generator construction
fail.balanced_batch_generator from imblearn.tensorflow when the workflow
expects a simple generator/steps-per-epoch pair.BalancedBatchGenerator from imblearn.keras when the workflow wants a
Keras Sequence-style object that can be passed to fit.sampler parameter when the default RandomUnderSampler is not the
desired balancing strategy.keep_sparse=True only when the downstream loop can consume sparse mini-
batches.These repo tests are the most relevant later verification anchors for this sub-skill:
imblearn/tensorflow/tests/test_generator.py::test_balanced_batch_generatorimblearn/tensorflow/tests/test_generator.py::test_balanced_batch_generator_function_sparseimblearn/keras/tests/test_generator.py::test_balanced_batch_generator_classimblearn/keras/tests/test_generator.py::test_balanced_batch_generator_functionsample_indices_.len(generator) uses floor division by batch_size.BalancedBatchGenerator depends on the optional backend being importable at
instantiation time.scripts/batch_generator_smoke.py for a tiny optional-backend batch smoke.