Skip to content
Back to skills

Model Architectures

ASecurity

"Instantiate, inspect, and debug fastMRI reconstruction model

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
code-qualitypython

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill model-architectures --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Architectures?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Model Architectures
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-model-architectures/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-model-architectures)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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](../data-loading/); for `UnetModule`, `VarNetModule`, training, validation, and test loops, hand off to [lightning-training](../lightning-training/).

## Bundled Guides

- Read [the model reference](references/model-reference.md) to get exact constructor signatures, input/output shapes, model-selection guidance, TorchScript evidence, and mask/low-frequency handling.
- Read [the offline pretrained inference guide](references/pretrained-inference.md) when adapting pretrained U-Net or VarNet inference while requiring a user-supplied local `state_dict` and avoiding hidden downloads.
- Read [the troubleshooting guide](references/troubleshooting.md) when diagnosing mask dtype/shape errors, pooling/crop failures, checkpoint mismatches, CUDA defaults, or adaptive/feature VarNet caveats.
- Run [the smoke shape script](scripts/smoke_model_shapes.py) 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.

Files in this skill

  • SKILL.md2.7 KB
  • references/model-reference.md7.3 KB
  • references/pretrained-inference.md4.3 KB
  • references/troubleshooting.md5.7 KB
  • scripts/smoke_model_shapes.py8.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.