界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

model-architectures

model-architectures

【开发与工程】Instantiate, inspect, and debug fastMRI reconstruction model architectures safely.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: model-architectures description: "Instantiate, inspect, and debug fastMRI reconstruction model architectures safely." disable-model-invocation: true metadata: disco-role: operating license: MIT

fastMRI Model Architectures

Use this sub-skill when an agent needs to choose, instantiate, inspect, smoke-test, or debug fastMRI reconstruction models without entering dataset loading, Lightning training loops, or metric/submission handling.

Route

  • Use raw torch.nn.Module classes from fastmri.models here: Unet, NormUnet, VarNet, AdaptiveVarNet, and policy/acquisition modules such as LOUPEPolicy.
  • Use Unet for image-domain baseline reconstruction checks; use VarNet for multicoil k-space reconstruction with sensitivity-map estimation and cascaded data consistency.
  • Use NormUnet as the complex-valued normalized U-Net block inside VarNet-style models, not as a drop-in replacement for image-domain Unet inputs.
  • Treat AdaptiveVarNet, LOUPEPolicy, and feature/adaptive example families as advanced/experimental paths with version and environment caveats.
  • For SliceDataset, masks, and data transforms, hand off to data-loading; for UnetModule, VarNetModule, training, validation, and test loops, hand off to lightning-training.

Bundled Guides

  • Read the model reference to get exact constructor signatures, input/output shapes, model-selection guidance, TorchScript evidence, and mask/low-frequency handling.
  • Read the offline pretrained inference guide when adapting pretrained U-Net or VarNet inference while requiring a user-supplied local state_dict and avoiding hidden downloads.
  • Read the troubleshooting guide when diagnosing mask dtype/shape errors, pooling/crop failures, checkpoint mismatches, CUDA defaults, or adaptive/feature VarNet caveats.
  • Run the smoke shape script to perform tiny CPU-only U-Net, NormUnet, VarNet, AdaptiveVarNet, and LOUPEPolicy instantiation/shape checks before touching real HDF5 data.

Safe Defaults

  • Start with python scripts/smoke_model_shapes.py --model all --device cpu from a copy or working directory where fastmri and torch are importable.
  • Keep pretrained inference offline by requiring --state_dict_file or equivalent local checkpoint input; do not silently download model weights.
  • Prefer explicit num_low_frequencies for VarNet smoke/debug runs when the mask's dense center region is known.
  • Use exact mask class names when routing data questions: EquiSpacedMaskFunc and EquispacedMaskFractionFunc are distinct names in fastMRI.
我的收藏