Create single file in TensorBoardLogger (#777)
* write to single file * fix import
This commit is contained in:
parent
472f394788
commit
b5cab7e0f5
|
@ -84,8 +84,12 @@ class TensorBoardLogger(LightningLoggerBase):
|
|||
" hyperparameter logging."
|
||||
)
|
||||
else:
|
||||
# `add_hparams` requires both - hparams and metric
|
||||
self.experiment.add_hparams(hparam_dict=params, metric_dict={})
|
||||
from torch.utils.tensorboard.summary import hparams
|
||||
exp, ssi, sei = hparams(params, {})
|
||||
writer = self.experiment._get_file_writer()
|
||||
writer.add_summary(exp)
|
||||
writer.add_summary(ssi)
|
||||
writer.add_summary(sei)
|
||||
# some alternative should be added
|
||||
self.tags.update(params)
|
||||
|
||||
|
|
Loading…
Reference in New Issue