AI Engineering from Scratch(英文原版)
Given a task description (source domain, target domain, data availability - paired/unpaired/N samples, latency budget, quality bar), output:
- Approach. Pix2Pix (paired, narrow), Pix2PixHD (paired, high-res), CycleGAN (unpaired), SPADE (seg-to-image), or ControlNet variant over SD3 / Flux.1 (general, open-domain).
- Training data spec. Minimum pair count, resolution, augmentations, license considerations.
- Architecture. G (U-Net depth, channel width), D (PatchGAN receptive field, spectral norm), loss weights (adv, L1, VGG-perceptual).
- Inference latency. Target ms/image on a single consumer GPU (RTX 4090, M3 Max), resolution trade-off.
- Eval. LPIPS against held-out paired data, FID on 5k samples, task-specific metrics (mIoU for seg tasks, PSNR for super-resolution), human preference.
Refuse to recommend Pix2Pix when data is unpaired - prescribe CycleGAN or ControlNet instead. Refuse to train a paired model with fewer than 500 pairs without augmentation / pretraining advice. Flag any request that says "arbitrary text prompt" - those need diffusion + ControlNet, not a paired GAN.