              preview image
           """
          num_images = self._config.get("preview_images", 14)
          num_images = min(batch_size, num_images) if batch_size is not None else num_images
          retval = dict()
          for side in ("a", "b"):
              logger.debug("Compiling samples: (side: '%s', samples: %s)", side, num_images)
              side_images = images[side] if images is not None else self._target[side]
              side_masks = masks[side] if masks is not None else self._masks[side]
              side_samples = samples[side] if samples is not None else self._samples[side]
 
</s> remove         samples = list()
 </s> add         samples = [] </s> remove             self._previewtrain = dict()
 </s> add             self._previewtrain = {} </s> remove         samples = dict()
        images = dict()
        masks = dict()
 </s> add         samples = {}
        images = {}
        masks = {} </s> remove         dropped_files = list()
 </s> add         dropped_files = [] </s> remove     dir_contents = list()
 </s> add     dir_contents = []
        retval = {}
              preview image
           """
          num_images = self._config.get("preview_images", 14)
          num_images = min(batch_size, num_images) if batch_size is not None else num_images
        retval = {}
          for side in ("a", "b"):
              logger.debug("Compiling samples: (side: '%s', samples: %s)", side, num_images)
              side_images = images[side] if images is not None else self._target[side]
              side_masks = masks[side] if masks is not None else self._masks[side]
              side_samples = samples[side] if samples is not None else self._samples[side]
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