技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
datamodules-and-tasks【数据与研究】Use for TorchGeo Lightning DataModules, CLI/config runs, task classes, losses, metrics, prediction/plot hooks, and training workflow wiring.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when wiring TorchGeo into Lightning training, validation, testing, prediction, CLI configs, or task modules.
BaseDataModule wraps a dataset class, batch_size, num_workers, split datasets, split dataloaders, and Kornia augmentation hooks.prepare_data() may download data when download=True; it must not create split state. setup(stage) creates datasets/samplers and is called on every process.GeoDataModule is for GeoDataset classes and sets collate_fn = stack_samples. It manages RandomPatchSampler, GriddedPatchSampler, and batch samplers for split-specific patch extraction.NonGeoDataModule is for integer-indexed datasets and ordinary PyTorch dataloader shuffle/split semantics.on_after_batch_transfer() applies the split-specific augmentation after the batch reaches the device. This is where Kornia GPU augmentations belong.TorchGeo task modules are Lightning modules for common geospatial ML problems:
Classification: timm-backed image classification with weights, in_channels, task type, class/label counts, losses, and optional frozen backbone.SemanticSegmentation: SMP or TorchGeo FCN segmentation with model, backbone, weights, in_channels, multiclass/multilabel/binary settings, losses, and freeze options.Before changing a task, inspect its corresponding tests/tasks/test_<task>.py for constructor matrix, batch schema, metric expectations, and trainer smoke coverage.
torchgeo console script is declared as torchgeo.main:main.max_epochs=1, small batch sizes, and no checkpoint downloads.(B, C, H, W); some spatiotemporal paths use (B, T, C, H, W) and may flatten or route to spatiotemporal tasks.