Recipes# Recipes are bite-sized, actionable examples of how to use specific PyTorch features, different from our full-length tutorials. All Defining a Neural Network Learn how to use PyTorch's torch.nn package to create and define a neural network for the MNIST dataset. Basics What is a state_dict in PyTorch Learn how state_dict objects and Python dictionaries are used in saving or loading models from PyTorch. Basics Warmstarting model using parameters from a different model in PyTorch Learn how warmstarting the training process by partially loading a model or loading a partial model can help your model converge much faster than training from scratch. Basics Zeroing out gradients in PyTorch Learn when you should zero out gradients and how doing so can help increase the accuracy of your model. Basics PyTorch Benchmark Learn how to use PyTorch's benchmark module to measure and compare the performance of your code Basics PyTorch Benchmark (quick start) Learn how to measure snippet run times and collect instructions. Basics PyTorch Profiler Learn how to use PyTorch's profiler to measure operators time and memory consumption Basics PyTorch Profiler with Instrumentation and Tracing Technology API (ITT API) support Learn how to use PyTorch's profiler with Instrumentation and Tracing Technology API (ITT API) to visualize operators labeling in Intel® VTune™ Profiler GUI Basics Torch Compile IPEX Backend Learn how to use torch.compile IPEX backend Basics Dynamic Compilation Control with ``torch.compiler.set_stance`` Learn how to use torch.compiler.set_stance Compiler Reasoning about Shapes in PyTorch Learn how to use the meta device to reason about shapes in your model. Basics Tips for Loading an nn.Module from a Checkpoint Learn tips for loading an nn.Module from a checkpoint. Basics (beta) Using TORCH_LOGS to observe torch.compile Learn how to use the torch logging APIs to observe the compilation process. Basics Extension points in nn.Module for loading state_dict and tensor subclasses New extension points in nn.Module. Basics torch.export AOTInductor Tutorial for Python runtime Learn an end-to-end example of how to use AOTInductor for python runtime. Basics Demonstration of torch.export flow, common challenges and the solutions to address them Learn how to export models for popular usecases Compiler,TorchCompile Model Interpretability using Captum Learn how to use Captum attribute the predictions of an image classifier to their corresponding image features and visualize the attribution results. Interpretability,Captum How to use TensorBoard with PyTorch Learn basic usage of TensorBoard with PyTorch, and how to visualize data in TensorBoard UI Visualization,TensorBoard Automatic Mixed Precision Use torch.cuda.amp to reduce runtime and save memory on NVIDIA GPUs. Model-Optimization Performance Tuning Guide Tips for achieving optimal performance. Model-Optimization Optimizing CPU Performance on Intel® Xeon® with run_cpu Script How to use run_cpu script ...