C.W.K.
Stream
Lesson 02 of 08 · published

Optimizer

~8 min · training

Level 0Keras 도제
0 XP0/97 lessons0/20 achievements
0/120 XP to next level120 XP to go0% complete

Adam — fast convergence, robust default. SGD with momentum — final accuracy 더 좋아질 때 (large-scale 학습 후반). RMSprop — RNN 에 좋다고 알려졌지만 Adam 으로도 충분. AdamW — weight decay 가 분리된 Adam, transformer fine-tune 에 표준.

learning rate 가 가장 영향력 큰 hyperparameter. Adam 의 default 1e-3 이 보통 OK 시작점. fine-tune 시 1e-5 ~ 1e-4 로 낮춰. plateau 치면 ReduceLROnPlateau callback 으로 자동 감소.

Code

# Cosine decay with warmup
lr_schedule = keras.optimizers.schedules.CosineDecay(
    initial_learning_rate=1e-3,
    decay_steps=10000,
    alpha=1e-6,       # Minimum learning rate
    warmup_target=1e-3,
    warmup_steps=1000,
)
optimizer = keras.optimizers.Adam(learning_rate=lr_schedule)

External links

Exercise

MNIST 를 learning rate [1e-1, 1e-2, 1e-3, 1e-4, 1e-5] 로 학습. training loss curve 그려. diverge / converge / 너무 느린 지점 식별.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.