This repository contains comprehensive PyTorch tutorials and quick reference materials for deep learning development.
π PyTorch Quick Reference Notebook
Essential operations for daily PyTorch development.
This section provides a comprehensive reference for common PyTorch tensor operations, from basic creation to advanced techniques.
- Tensor Creation: Basic tensors, random tensors, and data type conversion
- Tensor Manipulation: Reshaping, indexing, and slicing
- Mathematical Operations: Arithmetic, matrix operations, and statistics
- Gradient Operations: Automatic differentiation and gradient computation
- Device Operations: CPU/GPU management
- Advanced Operations: Concatenation, stacking, permutation, masking, gather and scatter, etc.
- Memory Optimization: In-place operations, memory sharing, and gradient checkpointing
- Time Series Operations: Rolling windows, moving averages, and sequence handling
- Performance Tips: Best practices for efficient PyTorch usage
- Debugging: Tensor inspection and common issues
- Practical Examples: Time series normalization, attention mechanisms, and efficient matrix operations
- einops for readable torch ops
Key highlights of advanced features:
- Memory optimization techniques including gradient checkpointing
- Efficient matrix operations for 2D tensors
- Attention mechanism implementations with temperature scaling
- Batch processing with automatic padding
Use these operations as building blocks for your PyTorch projects!
- PyTorch Official Documentation
- PyTorch Tutorials
- PyTorch Forums
- einops for common DL patterns
This project is open source and available under the MIT License.