토니의 연습장

Training Loop Structure ("FLOBS") 본문

AI 일반/모델, 아키텍처, 구현

Training Loop Structure ("FLOBS")

bellmake 2024. 8. 28. 14:21

Forward Pass : model(x_train)

Loss Calculation : loss = loss_fn(y_pred, y_train)

Optimizer zero_grad : optimizer.zero_grad()

Backprop/backward : loss.backward()

Step the optimizer (gradient descent) : optimizer.step()