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."
|
" hyperparameter logging."
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# `add_hparams` requires both - hparams and metric
|
from torch.utils.tensorboard.summary import hparams
|
||||||
self.experiment.add_hparams(hparam_dict=params, metric_dict={})
|
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
|
# some alternative should be added
|
||||||
self.tags.update(params)
|
self.tags.update(params)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue