Command Palette

Search for a command to run...

Назад к скиллам
скилл № 35578

ml-deep-learning

Use when the user asks about PyTorch or Keras training loops, nn.Module and DataLoader, CNNs, RNN/LSTM, transformers, mixed precision, torch.compile, gradient…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить ml-deep-learning в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

ML Deep Learning

Purpose

Design and train deep neural networks with PyTorch and TensorFlow. Build CNN, RNN, and transformer architectures. Optimize training with distributed strategies, mixed precision, and proper GPU utilization.

Agent Protocol

Trigger

Exact user phrases: "PyTorch", "TensorFlow", "Keras", "neural network", "CNN", "RNN", "LSTM", "transformer", "GAN", "autoencoder", "training loop", "backpropagation", "gradient descent", "CUDA", "distributed training", "mixed precision", "DDP", "FSDP", "AMP", "CUDA", "ResNet", "EfficientNet".

Input Context

Before activating, verify:

  • Framework (PyTorch, TensorFlow, JAX)
  • Problem type (image classification, NLP, time-series, generative)
  • Dataset size (images, sequences, total samples)
  • Hardware (single GPU, multi-GPU, TPU, CPU)
  • GPU type and memory (A100, V100, RTX, etc.)
  • Training constraints (time budget, memory budget)
  • Prior experiments or baseline results

Output Artifact

Model architecture definition, training loop, distributed strategy config, and optimization settings as Python.

Response Format

# Model architecture (nn.Module or Keras)
# Training loop with AMP and logging
# Distributed training launcher
# Training hyperparameters
# Hardware configuration
# Mixed precision settings

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.

Completion Criteria

  • Framework selected (PyTorch preferred for research, TF for production)
  • Model architecture defined (CNN, RNN, transformer)
  • Data loading configured (DataLoader, tf.data with prefetch/augmentation)
  • Training loop with gradient descent, logging, checkpointing
  • Distributed training configured (DDP for multi-GPU, FSDP for large models)
  • Mixed precision (AMP) configured for throughput
  • Hyperparameter optimization strategy defined
  • Evaluation on held-out test set with proper metrics

Max Response Length

300 lines of code and configuration.

Workflow

Step 1: Framework Selection

PyTorch: imperative/debuggable, research community standard, HuggingFace ecosystem, dynamic computation graphs, easier custom architectures. TensorFlow/Keras: production deployment (TF Serving, TF Lite, TF.js), static graph optimization, TFX pipeline integration, larger industrial ecosystem. JAX: functional, XLA-compiled, high-performance research, growing but smaller ecosystem. Recommendation: PyTorch for research and custom models, TensorFlow for production deployment pipelines.

# PyTorch: explicit training loop
import torch.nn as nn
import torch.optim as optim

class ImageClassifier(nn.Module):
    def __init__(self, num_classes=10):
        super().__init__()
        self.features = nn.Sequential(
            nn.Conv2d(3, 64, kernel_size=3, padding=1),
            nn.BatchNorm2d(64),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(2),
            nn.Conv2d(64, 128, 3, padding=1),
            nn.BatchNorm2d(128),
            nn.ReLU(inplace=True),
            nn.AdaptiveAvgPool2d(1),
        )
        self.classifier = nn.Linear(128, num_classes)

    def forward(self, x):
        x = self.features(x)
        x = x.view(x.size(0), -1)
        return self.classifier(x)

Step 2: Data Loading

PyTorch: Dataset class + DataLoader with num_workers, prefetch_factor, pin_memory. Augmentation: torchvision.transforms for images, custom transforms for audio/text. Multiprocessing: num_workers = 4-8 per GPU, prefetch_factor=2. TensorFlow: tf.data.Dataset with interleave, map (with num_parallel_calls), cache, prefetch. Data pipeline must never be the bottleneck.

from torch.utils.data import Dataset, DataLoader
from torchvision import transforms

class ImageDataset(Dataset):
    def __init__(self, file_paths, labels, transform=None):
        self.file_paths = file_paths
        self.labels = labels
        self.transform = transform or transforms.Compose([
            transforms.RandomResizedCrop(224),
            transforms.RandomHorizontalFlip(),
            transforms.ColorJitter(0.2, 0.2, 0.2, 0.1),
            transforms.ToTensor(),
            transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
        ])

    def __len__(self): return len(self.file_paths)

    def __getitem__(self, idx):
        image = Image.open(self.file_paths[idx]).convert("RGB")
        if self.transform:
            image = self.transform(image)
        return image, self.labels[idx]

train_loader = DataLoader(
    train_dataset, batch_size=64, shuffle=True,
    num_workers=8, pin_memory=True, prefetch_factor=2,
    persistent_workers=True,
)

Step 3: Training Loop

PyTorch: model.train(), optimizer.zero_grad(), loss.backward(), optimizer.step(). Gradient clipping for stability. Learning rate scheduling: cosine annealing, ReduceLROnPlateau, OneCycleLR. Checkpointing: save model state, optimizer state,

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/architectures.md
  • references/deep-learning-advanced.md
  • references/deep-learning-architecture-patterns.md
  • references/deep-learning-fundamentals.md
  • references/deep-learning-training-optimization.md
  • references/generative-models.md
  • references/pytorch-tensorflow.md
  • references/training-optimization.md

FAQ

Что делает скилл ml-deep-learning?

Use when the user asks about PyTorch or Keras training loops, nn.Module and DataLoader, CNNs, RNN/LSTM, transformers, mixed precision, torch.compile, gradient clipping or debugging a model that will not converge. Produces architecture and training-loop code with checkpoints and evaluation. Not for multi-GPU parallelism (use distributed-training) or LLM fine-tuning (use llm-finetuning).

Как установить скилл ml-deep-learning?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ml-deep-learning запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ml-deep-learning с