coarse-graining / cgnet

learning coarse-grained force fields
BSD 3-Clause "New" or "Revised" License
57 stars 26 forks source link

Tracking activation and weight histograms over training epochs #70

Closed nec4 closed 4 years ago

nec4 commented 5 years ago

Tensorflow has tensorboard to provide this functionality. But PyTorch has no such functionality. There are several wrappers to tensorboard for pytorch, but tensorboard seems somehwat limited in its saving capabilities. Is it worth building this functionality in CGnet? I think some small modifications to the CGnet() class can give logging access to the activation outputs and the weights over the training routine. There are several ways to accomplish this issue, and I am open to any other ideas.

Dom1L commented 5 years ago

Tensorboard has been implemented in Pytorch's 1.1 version (experimental) via

from torch.utils.tensorboard import SummaryWriter

but afaik this implementation is based on the TensorboardX repository. So far it didn't cause any problems for me, but I only used it to look at standard metrics and not any histograms.

Here are the docs

nec4 commented 5 years ago

Thanks! Will take a look.

Dom1L commented 5 years ago

With the new release of 1.2 not experimental anymore, see here

nec4 commented 5 years ago

Wonderful - I think we can possibly incorporate this to #6 or otherwise once we merge #58 to master.

brookehus commented 4 years ago

closing because old