Add Shape Types To Torch Model

Port a PyTorch model to use pyrefly's tensor shape type system (Tensor[[B, C, H, W]], Int[T]). Use this skill whenever the user wants to add shape annotations to a PyTorch model, type a model with tensor dimensions, port a model to use shape tracking, or annotate model forward methods with tensor shapes. Also use when the user mentions tensor shape ports, Int types for PyTorch, or pyrefly shape checking on a model file. Invoke BEFORE starting any model port — the skill's gated workflow prevents common failure modes.

facebook 11c7061 5 files · 95.0 KB Updated

File contents

facebook/pyrefly/tree/main/tensor-shapes/skills/add-shape-types-to-torch-model commit 11c7061255

Frequently asked questions

npx skillmds@latest add facebook/add-shape-types-to-torch-model