PyTorch Tensorboard 시각화

category AI 인공지능/AI Environment 2021. 9. 12. 17:22
728x90
반응형

기본적인 샘플링

from torch.utils.tensorboard import SummaryWriter
import numpy as np
writer = SummaryWriter()
for n_iter in range(100):
    writer.add_scalar('Loss/train', np.random.random(), n_iter)
    writer.add_scalar('Loss/test', np.random.random(), n_iter)
    writer.add_scalar('Accuracy/train', np.random.random(), n_iter)
    writer.add_scalar('Accuracy/test', np.random.random(), n_iter)
tensorboard --logdir runs

출처 : https://pytorch.org/docs/stable/tensorboard

728x90
반응형

'AI 인공지능 > AI Environment' 카테고리의 다른 글

Keras 멀티 GPU 사용 방법  (0) 2022.11.21
conda install vs pip install  (1) 2021.09.25
torchsummary 모델 정보 요약  (0) 2021.09.12
Tensorflow Object Detection 흐름도  (0) 2019.02.03