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

Image augmentation

~8 min · data

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

RandomFlip, RandomRotation, RandomZoom, RandomContrast 등. 학습 시 매 epoch *다른 변형 본*을 모델이 봐 → overfitting ↓ + 일반화 ↑. training=True 일 때만 적용 — eval 시 자동 꺼짐.

aggressiveness 튜닝: 약하게 시작 (rotation 5도, zoom 0.05), validation 좋아지면 강하게. 너무 강하면 underfitting — train accuracy 도 같이 떨어짐. 데이터 별로 적정량 다름.

백엔드 노트:
⚙️ Backend Note

Code

# Built-in Keras augmentation layers
data_augmentation = keras.Sequential([
    layers.RandomFlip("horizontal"),
    layers.RandomRotation(0.1),        # ±10% of full rotation
    layers.RandomZoom(0.1),            # ±10% zoom
    layers.RandomContrast(0.1),        # ±10% contrast
])

# Applied only during training (training=True)
# At inference time, augmentation is a no-op

External links

Exercise

CIFAR-10 을 3 augmentation 레벨 (none / mild flip+rotation 0.1 / heavy flip+rotation 0.3+zoom 0.2+contrast 0.3) 로 학습. training/validation curve 한 차트에. sweet spot 식별.

Progress

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

댓글 0

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

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