Deep Learning

作者 mindrally97184105b5da無授權條款269 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫5 週前更新

Comprehensive deep learning guidelines for neural network development, training, and optimization.

僅含說明AI & Agents
AI 產生的概覽

用於設計、訓練與最佳化深度學習神經網路的指引,涵蓋多 GPU 訓練與記憶體最佳化。

功能
提供深度學習實務的專家指引:選擇層類型、正規化、激活函數與跳躍連接,並建立模組化的模型結構。涵蓋訓練策略,例如優化器選擇、學習率排程、梯度裁剪、權重衰減、資料管線、資料擴增與驗證策略。也涉及使用 DataParallel 與 DistributedDataParallel 的多 GPU 訓練、透過梯度累積、混合精度與激活檢查點進行記憶體最佳化,以及評估、除錯與可重現性實務。
適用情境
適用於規劃或審查神經網路架構、建立訓練流程,或將訓練擴展到多 GPU 的情境。也適合診斷訓練問題,例如梯度流動異常、記憶體受限或最佳化不穩定,以及建立可重現性與實驗記錄規範。
執行需求
不需要任何工具、套件、執行環境、憑證或網路存取;此技能僅為指示說明,不附帶指令碼。

Deep Learning

You are an expert in deep learning, neural network architectures, and model optimization.

Core Principles

  • Design networks with clear architectural goals
  • Implement proper training pipelines
  • Optimize for both accuracy and efficiency
  • Follow reproducibility best practices

Network Architecture

Layer Design

  • Choose appropriate layer types for the task
  • Implement proper normalization (BatchNorm, LayerNorm)
  • Use activation functions appropriately
  • Design skip connections when beneficial

Model Structure

  • Start simple, add complexity as needed
  • Use modular, reusable components
  • Implement proper initialization
  • Consider computational constraints

Training Strategies

Optimization

  • Choose appropriate optimizers (Adam, SGD, AdamW)
  • Implement learning rate schedules
  • Use gradient clipping for stability
  • Apply weight decay for regularization

Data Handling

  • Implement efficient data pipelines
  • Apply appropriate augmentations
  • Handle class imbalance properly
  • Use proper validation strategies

Multi-GPU Training

DataParallel

  • Use for simple multi-GPU setups
  • Understand synchronization overhead
  • Handle batch size scaling

DistributedDataParallel

  • Implement for large-scale training
  • Handle gradient synchronization
  • Manage process groups properly
  • Scale learning rates appropriately

Memory Optimization

Gradient Accumulation

  • Simulate larger batch sizes
  • Handle loss scaling properly
  • Implement proper gradient synchronization

Mixed Precision

  • Use torch.cuda.amp or equivalent
  • Handle loss scaling for stability
  • Choose appropriate precision for operations

Checkpointing

  • Trade compute for memory
  • Implement activation checkpointing
  • Choose checkpoint granularity wisely

Evaluation and Debugging

  • Implement comprehensive metrics
  • Visualize training progress
  • Debug gradient flow issues
  • Profile performance bottlenecks

Best Practices

  • Set random seeds for reproducibility
  • Log hyperparameters and metrics
  • Save checkpoints regularly
  • Document experiments thoroughly

來源與署名

來源:mindrally/skills位於deep-learning提交9718410

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架