below works for me:
from torch import nn
from torch.utils.tensorboard import SummaryWriter

net = nn.Linear(8,8)
writer = SummaryWriter(DIR) #,flush_secs=120
for name, weight in net.named_parameters():
	writer.add_histogram(name, weight, global_step=1)
writer.flush() #to avoid delayed disk writes when inside a training loop