신경망을 구현하다 보면 굉장히 많은 매개변수를 다루게 됩니다. 이 매개변수들을 일일이 관리
하는 건 낭비죠. 그래서 파이토치는 매개변수들을 자동으로 관리해주는 메커니즘을 제공합니
다. 예를 들어 다음 클래스들을 이용하면 매개변수들을 간편하게 관리할 수 있습니다.
●
torch
.
nn
.
Parameter
●
torch
.
nn
.
Module
●
torch
.
optim
.
SGD
이번에는 앞 절에서 푼 문제를 여기 세 클래스를 사용하여 다시 작성하겠습니다.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.