training-data
Plan and operate iGAN dataset preparation, HDF5 schema checks, DCGAN training, batchnorm, predictor, packing, and training configuration workflows.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- training-data
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Plan and operate iGAN dataset preparation, HDF5 schema checks, DCGAN training, batchnorm, predictor, packing, and training configuration workflows.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/configuration.md5.3 KB
- 参考文档references/data-formats.md4.6 KB
- 参考文档references/training-workflows.md9.8 KB
- 参考文档references/troubleshooting.md6.9 KB
- 脚本scripts/igan_dataset_urls.py6.6 KB
- 脚本scripts/inspect_dataset_plan.py10.5 KB
03 SKILL.md 正文
iGAN Training Data Router
Use this sub-skill when the task is about building or auditing the data and training side of iGAN rather than loading a finished model for inference. It is intentionally safe to load in a modern environment: the bundled scripts only plan, inspect, and print commands; they never download datasets, write HDF5 files, start Theano, train networks, or touch a GPU.
Route Here
- Plan which public HDF5 dataset archive is needed and how much disk/network budget it implies.
- Preflight a custom image directory before converting it to iGAN's HDF5 layout.
- Explain the
imgsdataset shape, channel convention, Fuel split metadata, and train/test slicing expected by the legacy loaders. - Build a DCGAN training command sequence from an existing HDF5 file.
- Estimate the required post-training batchnorm steps for the generator, discriminator, and optional predictor.
- Plan predictor training for image-to-latent
x -> zsupport. - Pack trained cache files into a compact
.dcgan_theanomodel. - Upgrade an older packed model layout to the newer key layout.
- Add or compare entries in the training configuration table.
- Explain cache directories, sample grids, logs, model checkpoints, and web pages emitted during training.
- Advise how to extend iGAN with a custom Theano generative model class after training data and model packing are understood.
Route Elsewhere
- For loading a pre-trained
.dcgan_theanomodel, sampling images, or model download planning, use model-inference. - For interactive drawing UI behavior, PyQt4 windows, brush tools, and display issues, use interactive-ui.
- For non-UI constrained generation from color, mask, and edge inputs, use constraint-generation.
- For running image projection or reconstruction at inference time, use image-projection; keep predictor training and predictor batchnorm planning here.
- For general installation/import failures not tied to training scripts, check the root troubleshooting reference if one is available, then return here for training-specific symptoms.
First Checks
- Identify the intended model name, image size, and channel count.
- Decide whether the user already has an HDF5 dataset or only an image folder.
- Confirm whether the work is planning-only or a real legacy training run.
- For any real training run, require an explicit legacy Python/Theano/CUDA plan; modern CPU-only Python environments are enough for this sub-skill's helpers but not for native DCGAN training.
- Check disk budget before suggesting a public HDF5 archive; several archives are multi-gigabyte compressed files.
- Check cache and output paths before packing; packing only includes model files that already exist.
Safe Bundled Helpers
- Use
scripts/igan_dataset_urls.py --listto list known public HDF5 archives, compressed sizes, and URL/target path plans without network access. - Use
scripts/igan_dataset_urls.py --dataset shoes_64 --output-dir datasetsto reproduce the download target naming convention in dry-run form. - Use
scripts/inspect_dataset_plan.py --mode dir --dataset-dir images --width 64 --channel 3 --hdf5-file datasets/custom.hdf5to preflight a custom image directory and report the intendedimgsshape and train/test split without writing HDF5. - Add
--model-name hed_shoes_64or another known config to the preflight script when you want width/channel mismatch warnings. - Add
--jsonto either helper when another tool needs deterministic structured output.
Main References
- training-workflows.md gives runnable command templates for dataset acquisition planning, HDF5 conversion, DCGAN training, batchnorm estimation, predictor training, packing, upgrading, and custom model extension.
- data-formats.md explains public dataset names, HDF5 schema, image preprocessing, Fuel split metadata, cache outputs, and packed model keys.
- configuration.md summarizes model configuration functions, default hyperparameters, CLI options, and path conventions.
- troubleshooting.md maps concrete symptoms to likely causes and recovery steps for legacy Theano/CUDA, Fuel/HDF5, OpenCV, predictor, packing, and script-typo failures.
Dataset Decision Pattern
- If the user wants one of the public domains, run the URL planner first.
- If network or disk budget is not approved, stop at a plan and mark the native dataset download case as skipped.
- If the user has local images, run the dataset preflight helper before any conversion command.
- Keep the conversion output name explicit; the training scripts otherwise
assume
datasets/<model_name>.hdf5. - Make the model configuration match the dataset width and channel count.
Training Decision Pattern
- Start from an HDF5 file with an
imgsdataset andtrain/testFuel split. - Run DCGAN training only in a compatible legacy GPU environment.
- Estimate DCGAN batchnorm after generator/discriminator checkpoints exist.
- Train the optional predictor only when image projection through
cnnorcnn_optneeds a learnedx -> znetwork. - Estimate predictor batchnorm after predictor parameters exist.
- Pack all available model and batchnorm artifacts into one
.dcgan_theanofile for downstream inference and UI workflows.
Corrected End-to-End Sequence
Use this corrected order when reconstructing the legacy shell recipe:
train_dcgan.pybatchnorm_dcgan.pytrain_predict_z.pywhen predictor support is wantedbatchnorm_predict_z.pywhen predictor support is wantedpack_model.py
The historical shell recipe misspelled the fourth command as
batchnorm_precit_z.py; that file is not part of the workflow. Always use the
correct batchnorm_predict_z.py command shown in the reference.
Verification Expectations
- The bundled helpers should run with
python <script> --helpon any modern Python 3 environment. - The URL helper can be checked without network by comparing names, URLs, sizes, and target paths.
- The dataset preflight helper can be checked with a tiny directory of fake or real image-named files because it only inspects names and plans shapes.
- Native HDF5 creation is optional CPU verification if OpenCV, h5py, and Fuel are installed.
- Native DCGAN training, DCGAN batchnorm, predictor training, predictor batchnorm, and real projection-dependent checks are optional expensive CUDA cases unless a compatible legacy stack and artifacts are provided.
Operating Reminders
- Do not present planning helper output as proof that a model was trained.
- Do not hide legacy constraints: the original code targets Python2-era Theano, CUDA, cuDNN, Fuel, Lasagne, and OpenCV APIs.
- Do not download public archives or delete ZIP files from inside this skill; only show a plan and ask for explicit execution outside the helper if needed.
- Do not point users back to source checkout files for routine workflows; this sub-skill and its references contain the needed commands and contracts.
- Keep inference-only questions out of this sub-skill even when they mention a trained model file; route them to model inference unless the question is about creating, packing, or upgrading that file.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).