Skip to content

Commit

Permalink
Replace remaining f-strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Petersen committed Feb 15, 2019
1 parent e98073c commit 0df81c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trixi/logger/tensorboard/tensorboardxlogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ def show_value(self, value, name="Value", counter=None, tag=None, **kwargs):
key = tag + "-" + name

if counter is not None:
self.val_dict[f"{key}-image"] = counter
self.val_dict["{}-image".format(key)] = counter
else:
self.val_dict[f"{key}-image"] += 1
self.val_dict["{}-image".format(key)] += 1

if tag is not None:
self.writer.add_scalars(tag, {name: value}, global_step=self.val_dict[f"{key}-image"])
self.writer.add_scalars(tag, {name: value}, global_step=self.val_dict["{}-image".format(key)])
self.writer.scalar_dict = {}
else:
self.writer.add_scalar(name, value, global_step=self.val_dict[f"{key}-image"])
self.writer.add_scalar(name, value, global_step=self.val_dict["{}-image".format(key)])

def show_text(self, text, name="Text", counter=None, **kwargs):
"""
Expand Down

0 comments on commit 0df81c1

Please sign in to comment.