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

TensorFlow Backend

~8 min · backend

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

TensorFlow backend 의 강점은 *deployment 인프라* 야. TFLite 로 mobile / edge, TF Serving 으로 server / API, TensorFlow.js 로 browser, 그리고 TPU 까지. 학습용으론 PyTorch 보다 dominant 안 한데, ship-to-prod 경로는 가장 성숙해.

Keras 3 + TF backend 면 model.export() 가 SavedModel 또는 TFLite 로 깔끔히 빠져. TF 1.x 시절 graph mode 가 아니라 모두 eager — 디버깅도 print 만 박으면 보여.

Code

os.environ["KERAS_BACKEND"] = "tensorflow"
import keras

model = keras.Sequential([...])
model.compile(optimizer="adam", loss="sparse_categorical_crossentropy")
model.fit(x_train, y_train)

# Export for TF Serving
model.export("serving_model", format="tf_saved_model")

External links

Exercise

KERAS_BACKEND=tensorflow 로 tiny MNIST 모델 만들고 한 epoch 학습. model.export('mymodel') 호출하고 TF SavedModel 구조 (assets/, variables/, saved_model.pb) 확인.

Progress

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

댓글 0

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

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