Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#3904·tutorials

Feedback about Quickstart

Author: dearwind153Created May 21, 2026Updated May 27, 2026

There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/basics/quickstart_tutorial.html

In the Section "Optimizing the Model Parameters", the backpropagation code order should be

    # Backpropagation
    _**optimizer.zero_grad()**_
    loss.backward()
    optimizer.step()

Source: pytorch/tutorials

View original on GitHubView discussion on GitHub