Sahaj.blogs

Day page

14 Mar 2025

Study

Deep Learning · PyTorch tensors and autograd

PyTorch tensors (NumPy-like, with devices and dtypes), the dynamic computation graph, requires_grad, backward(), and no_grad.

  • Autograd records operations on tensors with requires_grad=True and computes gradients when you call backward().
  • Gradients accumulate, so they must be zeroed before each new backward pass.

Read the post →