Update utils.py

This commit is contained in:
Mingshuang Luo 2021-09-29 16:43:01 +08:00 committed by GitHub
parent ec3b1bb015
commit 7faab70ddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -478,8 +478,12 @@ class LossRecord(collections.defaultdict):
for k, v in zip(keys, s.cpu().tolist()):
self[k] = v
def write_summary(self, tb_writer: SummaryWriter,
prefix: str, batch_idx: int) -> None:
def write_summary(
self,
tb_writer: SummaryWriter,
prefix: str,
batch_idx: int
) -> None:
"""Add logging information to a TensorBoard writer.
Args: