C.W.K.
Stream
Lesson 06 of 07 · published

Debugging 전략

~8 min · advanced

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

학습 안 될 때 체크리스트: (1) data sanity — label 매칭, normalization 범위, augmentation 이 깨뜨리는지. 1 batch 만 print 해 봐. (2) loss 매칭 — activation 과 짝 맞는지. (3) learning rate — 너무 크면 NaN, 너무 작으면 정체.

(4) vanishing/exploding gradienttf.debugging.check_numerics 또는 callback 으로 체크. (5) overfitting — train ↓ val ↑ 면 augmentation / dropout / L2 추가. (6) tiny dataset 으로 overfit 시키기 — model 자체가 학습 가능한지 sanity check.

Code

# Gradient clipping to prevent NaN
optimizer = keras.optimizers.Adam(
    learning_rate=1e-3,
    clipnorm=1.0,  # Clip gradient norm
)

External links

Exercise

동작하는 CIFAR-10 모델. 버그 3 개 (하나씩) 도입 — (a) label off-by-one, (b) loss/activation 불일치, (c) learning rate 100×. 각각 증상 메모 — failure mode library entry.

Progress

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

댓글 0

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

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