Related to: Machine Learning

개요

PyTorch에서 tensor의 requires_grad 파라미터가 자동 미분(자동 미분(Autograd))에 미치는 영향을 설명합니다.

핵심 개념

torch.tensor의 requires_grad param의 기능

  • requires_grad = True일 경우, 해당 tensor는 model이 backward 될 때 자동미분(auto grad)을 수행합니다.
  • requires_grad = False(기본값)일 경우, 해당 tensor는 gradient 계산에서 제외됩니다.

관련 개념

참조

Week 2