Rate this Page

PyTorch Recipes#

  1. defining_a_neural_network.py

    Defining a Neural Network in PyTorch https://pytorch.org/tutorials/recipes/recipes/defining_a_neural_network.html

  2. what_is_state_dict.py

    What is a state_dict in PyTorch https://pytorch.org/tutorials/recipes/recipes/what_is_state_dict.html

  3. saving_and_loading_models_for_inference.py

    Saving and loading models for inference in PyTorch https://pytorch.org/tutorials/recipes/recipes/saving_and_loading_models_for_inference.html

  4. Captum_Recipe.py

    Model Interpretability using Captum https://pytorch.org/tutorials/recipes/recipes/Captum_Recipe.html

  5. warmstarting_model_using_parameters_from_a_different_model.py

    Warmstarting models using parameters from different model https://pytorch.org/tutorials/recipes/recipes/warmstarting_model_using_parameters_from_a_different_model.html

  6. zeroing_out_gradients.py

    Zeroing out gradients https://pytorch.org/tutorials/recipes/recipes/zeroing_out_gradients.html

  7. mobile_perf.py

    PyTorch Mobile Performance Recipes https://pytorch.org/tutorials/recipes/mobile_perf.html

  8. amp_recipe.py

    Automatic Mixed Precision https://pytorch.org/tutorials/recipes/recipes/amp_recipe.html

  9. regional_compilation.py
    Reducing torch.compile cold start compilation time with regional compilation

    https://pytorch.org/tutorials/recipes/regional_compilation.html

Performance Tuning Guide

Performance Tuning Guide

Changing default device

Changing default device

How to use TensorBoard with PyTorch

How to use TensorBoard with PyTorch

What is a state_dict in PyTorch

What is a state_dict in PyTorch

Warmstarting model using parameters from a different model in PyTorch

Warmstarting model using parameters from a different model in PyTorch

Reasoning about Shapes in PyTorch

Reasoning about Shapes in PyTorch

Tips for Loading an nn.Module from a Checkpoint

Tips for Loading an nn.Module from a Checkpoint

Defining a Neural Network in PyTorch

Defining a Neural Network in PyTorch

Zeroing out gradients in PyTorch

Zeroing out gradients in PyTorch

Timer quick start

Timer quick start

Model Interpretability using Captum

Model Interpretability using Captum

Extension points in nn.Module for load_state_dict and tensor subclasses

Extension points in nn.Module for load_state_dict and tensor subclasses

PyTorch Profiler

PyTorch Profiler

Automatic Mixed Precision

Automatic Mixed Precision

PyTorch Benchmark

PyTorch Benchmark