          logger.debug("Initializing %s: model: '%s', coverage_ratio: %s)",
                       self.__class__.__name__, model, coverage_ratio)
          self._model = model
          self._display_mask = model.config["learn_mask"] or model.config["penalized_mask_loss"]
          self.images = dict()
          self._coverage_ratio = coverage_ratio
          self._scaling = scaling
          logger.debug("Initialized %s", self.__class__.__name__)
  
      def toggle_mask_display(self):
 
</s> remove         filename = "{}_state.{}".format(model_name, self._serializer.file_extension)
 </s> add         filename = f"{model_name}_state.{self._serializer.file_extension}" </s> remove         self._carry_over = dict()
 </s> add         self._carry_over = {} </s> remove         self._target = dict()
        self._samples = dict()
        self._masks = dict()
 </s> add         self._target = {}
        self._samples = {}
        self._masks = {} </s> remove         self._stats = dict()
 </s> add         self._stats = {} </s> remove             retval = KerasModel(model_inputs, model, name="{}_inference".format(saved_model.name))
 </s> add             retval = KerasModel(model_inputs, model, name=f"{saved_model.name}_inference")
        self.images = {}
          logger.debug("Initializing %s: model: '%s', coverage_ratio: %s)",
                       self.__class__.__name__, model, coverage_ratio)
          self._model = model
          self._display_mask = model.config["learn_mask"] or model.config["penalized_mask_loss"]
        self.images = {}
          self._coverage_ratio = coverage_ratio
          self._scaling = scaling
          logger.debug("Initialized %s", self.__class__.__name__)
  
      def toggle_mask_display(self):
keep keep keep keep 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