La interfaz está localizada; las descripciones y documentos de las Skills se traducen automáticamente con IA a su idioma. El código, los comandos, rutas y términos técnicos se mantienen en el original, y prevalece el documento del autor.
Explorar Skills
Productividad · SKILL.md

model-task-adaptation

model-task-adaptation

Routes pytorch-grad-cam adaptation for ViT, Swin, CLIP, object detection, semantic segmentation, embeddings, custom targets, and reshape transforms.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentación de la Skill

GitHub

name: model-task-adaptation description: "Routes pytorch-grad-cam adaptation for ViT, Swin, CLIP, object detection, semantic segmentation, embeddings, custom targets, and reshape transforms." disable-model-invocation: true metadata: disco-role: operating license: MIT

Model and Task Adaptation

Use this sub-skill when the model output or intermediate activation is not an ordinary CNN feature map plus classification logits. It covers transformer token reshaping, CLIP prompt scoring, HuggingFace/timm optional dependencies, object detection and segmentation targets, embeddings/similarity outputs, and custom callables.

Read first

Adaptation contract

  1. Identify the tensor or structured output whose scalar should be explained.
  2. Write a target callable that reduces that output to one scalar per batch item.
  3. Identify the activation shape at the chosen target layer.
  4. If it is not already spatial B x C x H x W, pass a reshape_transform that removes non-spatial tokens and transposes to channel-first layout.
  5. Verify output shapes and device/dtype behavior with synthetic tensors before downloading external models or running expensive examples.

Do not select a final transformer block blindly: if the classifier reads only a class token, patch gradients at the final block can be zero. Use the nearest pre-head spatially meaningful layer and validate it.

Skills guardadas