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

Keras 3 가 API 와 engine 을 분리한 방법

~8 min · backend

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

Keras 3 의 간판 트릭: env var 한 줄로 runtime 에 backend 골라. TensorFlow / PyTorch / JAX — `model = keras.Sequential(...)` 똑같고 `.fit()` 똑같아. 이 track 은 그 mental model, 흔한 gotcha (backend 섞으면 tensor 호환 안 됨), 그리고 backend-agnostic custom math 짜게 해주는 `keras.ops` namespace 를 가르친다.

Keras 3 의 진짜 마법은 *추상화 레이어 두께* 야. keras.Sequential·keras.layers.Dense·model.fit 이 표면이고, 그 아래 backend interface 가 NumPy 식 keras.ops 호출을 active engine 의 native op 으로 dispatch 해. 그래서 KERAS_BACKEND=jax=torch 든 표면 코드는 한 줄도 안 바뀌어.

process 안에선 backend 한 번 박히면 끝 — import keras 시점에 결정돼. 다른 backend 로 가려면 새 process. 이 단순 룰이 cross-backend 디버깅을 깔끔하게 만들어줘.

External links

Exercise

keras.io 의 'Keras 3 announcement' 페이지 읽고 Chollet 이 분리(decouple)됐다고 말하는 세 가지 짚어. 본인 말로 적어봐.

Progress

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

댓글 0

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

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