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

TensorBoard 개요 — 8개 dashboard

~10 min · tensorboard, visualization, monitoring

Level 0Level 0
0 XP0/78 lessons0/17 achievements
0/100 XP to next level100 XP to go0% complete

Model이 뭐 하는지 보는 창

TensorBoard는 TF의 시각화 스위트 — 신경망 training의 불투명한 과정을 시각적 이야기로 바꾸는 브라우저 dashboard. Training에 log directory로 event 파일 쓰는 instrument 넣고, TensorBoard 띄워서 인터랙티브하게 탐색.

TF 2.21 변경: TensorBoard가 더 이상 TF에 번들 안 됨. 별도 설치: pip install tensorboard. tensorboard --logdir logs/로 실행하고 http://localhost:6006 열어.

쓰게 될 dashboard들:

  • Scalars — step별 loss, accuracy, LR. 가장 먼저 볼 것.
  • Graphs — model architecture 시각화, shape 디버깅
  • Histograms — 시간에 따른 weight/gradient 분포, dead neuron 찾기
  • Images — 샘플 이미지, attention map, heatmap
  • Projector — embedding 시각화 (PCA, t-SNE, UMAP)
  • Profile — GPU/TPU 사용률, op 타이밍, 입력 pipeline 분석
  • HParams — 하이퍼파라미터 sweep 비교
  • What-If Tool — model fairness, counterfactual, slice 분석

Code

TensorBoard via Keras callback·python
import tensorflow as tf
import datetime

log_dir = "logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")

tensorboard_cb = tf.keras.callbacks.TensorBoard(
    log_dir=log_dir,
    histogram_freq=1,        # log weight histograms every epoch
    write_graph=True,        # log model architecture graph
    write_images=False,      # log weight images (expensive)
    update_freq='epoch',     # 'epoch' or 'batch'
    profile_batch='5, 10',   # profile batches 5-10 for performance
)

model.fit(train_ds, validation_data=val_ds, epochs=50,
          callbacks=[tensorboard_cb])
TensorBoard 실행·bash
# Terminal
tensorboard --logdir logs/
# Open http://localhost:6006

# Jupyter / Colab
%load_ext tensorboard
%tensorboard --logdir logs/

External links

Progress

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

댓글 0

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

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