           """
          output = ", ".join(["Loss {}: {:.5f}".format(side, side_loss)
                              for side, side_loss in zip(("A", "B"), loss)])
          timestamp = time.strftime("%H:%M:%S")
          output = "[{}] [#{:05d}] {}".format(timestamp, self._model.iterations, output)
          print("\r{}".format(output), end="")
  
      def clear_tensorboard(self):
          """ Stop Tensorboard logging.
  
          Tensorboard logging needs to be explicitly shutdown on training termination. Called from
 
</s> remove         output = ", ".join(["Loss {}: {:.5f}".format(side, side_loss)
 </s> add         output = ", ".join([f"Loss {side}: {side_loss:.5f}" </s> remove         images = dict()
 </s> add         images = {} </s> remove         vers = self._tf_version
        kwargs = dict(loss_scale="dynamic") if vers[0] == 2 and vers[1] < 4 else dict()
        logger.debug("tf version: %s, kwargs: %s", vers, kwargs)
 </s> add         kwargs = dict(loss_scale="dynamic") if get_tf_version() < 2.4 else {}
        logger.debug("tf version: %s, kwargs: %s", get_tf_version(), kwargs) </s> remove                 if not split_output:  # Rename losses to reflect the side's output
                    loss_name = f"{loss_name.replace('_both', '')}_{side}"
 </s> add                 if loss_name[-2:] not in ("_a", "_b"):  # Rename losses to reflect the side output
                    new_name = f"{loss_name.replace('_both', '')}_{side}"
                    logger.debug("Renaming loss output from '%s' to '%s'", loss_name, new_name)
                    loss_name = new_name </s> remove         step.setdefault("loss", list()).append(summary.simple_value)
 </s> add         loss = summary.simple_value
        if not loss:
            # Need to convert a tensor to a float for TF2.8 logged data. This maybe due to change
            # in logging or may be due to work around put in place in FS training function for the
            # following bug in TF 2.8 when writing records:
            #  https://github.com/keras-team/keras/issues/16173
            loss = float(tf.make_ndarray(summary.tensor))

        step.setdefault("loss", []).append(loss)

        output = f"[{timestamp}] [#{self._model.iterations:05d}] {output}"
        print(f"\r{output}", end="")
           """
          output = ", ".join(["Loss {}: {:.5f}".format(side, side_loss)
                              for side, side_loss in zip(("A", "B"), loss)])
          timestamp = time.strftime("%H:%M:%S")
        output = f"[{timestamp}] [#{self._model.iterations:05d}] {output}"
        print(f"\r{output}", end="")
        output = f"[{timestamp}] [#{self._model.iterations:05d}] {output}"
        print(f"\r{output}", end="")
  
      def clear_tensorboard(self):
          """ Stop Tensorboard logging.
  
          Tensorboard logging needs to be explicitly shutdown on training termination. Called from
keep keep keep keep replace replace keep keep keep keep keep
 Update code to support Tensorflow versions up to 2.8 (#1213)

* Update maximum tf version in setup + requirements

* - bump max version of tf version in launcher
- standardise tf version check

* update keras get_custom_objects  for tf>2.6

* bugfix: force black text in GUI file dialogs (linux)

* dssim loss - Move to stock tf.ssim function

* Update optimizer imports for compatibility

* fix logging for tf2.8

* Fix GUI graphing for TF2.8

* update tests

* bump requirements.txt versions

* Remove limit on nvidia-ml-py

* Graphing bugfixes
  - Prevent live graph from displaying if data not yet available

* bugfix: Live graph. Collect loss labels correctly

* fix: live graph - swallow inconsistent loss errors

* Bugfix: Prevent live graph from clearing during training

* Fix graphing for AMD 
plugins/train/trainer/_base.py