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

Keras Applications

~8 min · transfer

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

내장 카탈로그

keras.applications 안에 ImageNet pretrained 이미지 모델 37+ 개가 바로 들어있어 — ResNet, EfficientNet, MobileNet, VGG, DenseNet, Xception 등. 이름값으로 고르는 게 아니라 *어디서 돌릴 거냐* (서버 / mobile / edge) 랑 *parameter 더 써서 정확도 얼마나 살 거냐* 의 trade-off 로 골라.

ModelParamsTop-1 AccBest For
EfficientNetV26M–119M최대 85.7%정확도/효율 trade-off 최강
ResNet5025M76.0%널리 쓰임, 이해 쉬움
MobileNetV32.5M–5.4M75.2%Mobile/edge 배포
ConvNeXt28M–350M최대 88.5%현대 CNN architecture
VGG16138M71.3%단순, 교육용

핵심 인자 하나 — include_top

transfer learning 에선 거의 항상 include_top=False 로 로드해. 이 인자가 ImageNet classifier 를 위에 붙일지 말지를 정해. False 면 마지막 1000-way Dense layer 를 떼고 순수 feature extractor (이미지 → feature map 만드는 conv stack) 만 줘. 거기에 내 class 수에 맞는 head 를 직접 붙이지. 기본값 include_top=True 는 ImageNet 원래 1000 카테고리를 그대로 예측하고 싶을 때만 써. 아래 Code section 이 그 호출이야.

sizing 디테일 하나: include_top=False 출력은 vector 가 아니라 feature map (height × width × channel) 이야 — 그래서 다음 lesson 은 backbone 뒤에 항상 GlobalAveragePooling2D 를 두고 Dense head 를 붙여.

Code

classifier head 없이 backbone 로드·python
# Load pretrained model (without classification head)
base_model = keras.applications.EfficientNetV2S(
    weights="imagenet",
    include_top=False,      # Remove classification layers
    input_shape=(224, 224, 3),
)

External links

Exercise

ResNet50 을 include_top=False 로 로드. (224,224,3) 입력의 출력 shape 출력. GlobalAveragePooling + Dense(num_classes) 위에 추가. model.summary() 합리적인지 확인.

Progress

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

댓글 0

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

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