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

Core layer

~8 min · layers

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

Layer 는 원자. `Dense`, `Conv2D`, `MultiHeadAttention`, `LayerNormalization`, `Dropout`, 그리고 *모델 안에* normalization / tokenization 박는 preprocessing layer — 배포할 때 같이 따라가게 만드는 그 발상. 이 track 은 Keras 기본 카탈로그 훑기.

Keras 의 핵심 layer 5 종 — Dense (fully-connected), Embedding (token → vector), Activation (non-linearity), Dropout (regularization), Reshape (shape 변환). 거의 모든 model 이 이 5 개 위에서 빌드돼.

Dense 가 가장 흔해 — output = activation(W·input + b). Embedding 은 NLP 의 첫 layer (vocab_size × embed_dim). Activation 은 layer 안에 박혀있을 때가 많지만 분리해도 OK. Dropout 은 학습 시만, eval 시 자동 꺼짐.

Code

# Embedding layer: integer tokens → dense vectors
embedding = layers.Embedding(
    input_dim=10000,   # Vocabulary size
    output_dim=128,     # Embedding dimension
    mask_zero=True,     # Treat 0 as padding
)
# Input shape: (batch, seq_len) of integers
# Output shape: (batch, seq_len, 128) of floats

External links

Exercise

5 core layer 를 다 쓰는 model 짜. Embedding 은 vocab_size=100, embed_dim=8. Reshape 는 (batch, 28, 28) 을 (batch, 784) 로.

Progress

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

댓글 0

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

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