Hila's picture
init commit
7754b29
raw
history blame
311 Bytes
import os
from torch.utils.tensorboard import SummaryWriter
class TensorboardSummary(object):
def __init__(self, directory):
self.directory = directory
self.writer = SummaryWriter(log_dir=os.path.join(self.directory))
def add_scalar(self, *args):
self.writer.add_scalar(*args)