          summary = event.summary.value[0]
          if summary.tag in ("batch_loss", "batch_total"):  # Pre tf2.3 totals were "batch_total"
              step["timestamp"] = event.wall_time
              return step
          step.setdefault("loss", list()).append(summary.simple_value)
          return step
 
</s> remove         retval = dict()
 </s> add         retval = {} </s> remove             stats = dict()
 </s> add             stats = {} </s> remove         rate = list()
 </s> add         rate = [] </s> remove         retval = dict()
 </s> add         retval = {} </s> remove             retval = loss_keys[session_id]
 </s> add             retval = loss_keys.get(session_id)
        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)

          summary = event.summary.value[0]
          if summary.tag in ("batch_loss", "batch_total"):  # Pre tf2.3 totals were "batch_total"
              step["timestamp"] = event.wall_time
              return step
        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)

          return step
keep keep keep keep replace 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 
lib/gui/analysis/event_reader.py