              The original optimizer with loss scaling applied
          """
          # tensorflow versions < 2.4 had different kwargs where scaling needs to be explicitly
          # defined
          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)
          return self._mixed_precision.LossScaleOptimizer(optimizer, **kwargs)
  
      @classmethod
      def _set_tf_settings(cls, allow_growth, exclude_devices):
          """ Specify Devices to place operations on and Allow TensorFlow to manage VRAM growth.
 
</s> remove         self._tf_version = [int(i) for i in tf.__version__.split(".")[:2]]
 </s> add  </s> remove         if use_mixed_precision and self._tf_version[0] == 2 and self._tf_version[1] < 4:
 </s> add         if use_mixed_precision and get_tf_version() < 2.4: </s> remove         kwargs = dict()
 </s> add         kwargs = dict(master=self._dummy_master)
 </s> remove         if self._tf_version[0] == 2 and self._tf_version[1] < 4:
 </s> add         if get_tf_version() < 2.4: </s> remove         output = "[{}] [#{:05d}] {}".format(timestamp, self._model.iterations, output)
        print("\r{}".format(output), end="")
 </s> add         output = f"[{timestamp}] [#{self._model.iterations:05d}] {output}"
        print(f"\r{output}", end="")
        kwargs = dict(loss_scale="dynamic") if get_tf_version() < 2.4 else {}
        logger.debug("tf version: %s, kwargs: %s", get_tf_version(), kwargs)
              The original optimizer with loss scaling applied
          """
          # tensorflow versions < 2.4 had different kwargs where scaling needs to be explicitly
          # defined
        kwargs = dict(loss_scale="dynamic") if get_tf_version() < 2.4 else {}
        logger.debug("tf version: %s, kwargs: %s", get_tf_version(), kwargs)
        kwargs = dict(loss_scale="dynamic") if get_tf_version() < 2.4 else {}
        logger.debug("tf version: %s, kwargs: %s", get_tf_version(), kwargs)
        kwargs = dict(loss_scale="dynamic") if get_tf_version() < 2.4 else {}
        logger.debug("tf version: %s, kwargs: %s", get_tf_version(), kwargs)
          return self._mixed_precision.LossScaleOptimizer(optimizer, **kwargs)
  
      @classmethod
      def _set_tf_settings(cls, allow_growth, exclude_devices):
          """ Specify Devices to place operations on and Allow TensorFlow to manage VRAM growth.
keep keep keep keep replace 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/model/_base.py