from tesnsorboardX import SummaryWriter
#create the writer
writer = SummaryWriter('your path')
writer.add_scalar('losstotal', loss, epoch)
#the losstotal is your variable name, loss is the value u want to monitor. Epoch is for counting.
writer.add_graph(your model, input)
# Always I do not use the writer.close()
$ tensorboard --logdir yourpath
ok!!! So easy!



