      GUI. Thread safe to take requests from the main thread and the training thread. """
      def __init__(self) -> None:
          self._lock = Lock()
          self._dpi: float = 0.0
          self._toggle_mask: bool = False
          self._full_size: bool = False
          self._refresh: bool = False
          self._save: bool = False
          self._quit: bool = False
          self._needs_update: bool = False
          self._preview_buffer: Dict[str, np.ndarray] = {}
          self._images: Dict[str, Tuple[figure.Figure, Tuple[float, float]]] = {}
          self._resize_ids: List[Tuple[figure.Figure, int]] = []
          self._callbacks = dict(f="_toggle_size",
 
</s> remove         self._callbacks = dict(f="_toggle_size",
                               m="_toggle_mask",
                               r="_refresh",
                               s="_save",
                               enter="_quit")
 </s> add         self._callbacks = dict(f="full_size",
                               m="toggle_mask",
                               r="refresh",
                               s="save",
                               enter="quit") </s> remove                 self._toggle_mask = False
 </s> add                 self._triggers["toggle_mask"] = False </s> remove             retval = self._toggle_mask
 </s> add             retval = self._triggers["toggle_mask"] </s> remove             retval = self._refresh
 </s> add             retval = self._triggers["refresh"] </s> remove             retval = self._save
 </s> add             retval = self._triggers["save"]
        self._triggers: Dict[str, bool] = dict(toggle_mask=False,
                                               full_size=False,
                                               refresh=False,
                                               save=False,
                                               quit=False)
      GUI. Thread safe to take requests from the main thread and the training thread. """
      def __init__(self) -> None:
          self._lock = Lock()
          self._dpi: float = 0.0
        self._triggers: Dict[str, bool] = dict(toggle_mask=False,
                                               full_size=False,
                                               refresh=False,
                                               save=False,
                                               quit=False)
        self._triggers: Dict[str, bool] = dict(toggle_mask=False,
                                               full_size=False,
                                               refresh=False,
                                               save=False,
                                               quit=False)
        self._triggers: Dict[str, bool] = dict(toggle_mask=False,
                                               full_size=False,
                                               refresh=False,
                                               save=False,
                                               quit=False)
        self._triggers: Dict[str, bool] = dict(toggle_mask=False,
                                               full_size=False,
                                               refresh=False,
                                               save=False,
                                               quit=False)
        self._triggers: Dict[str, bool] = dict(toggle_mask=False,
                                               full_size=False,
                                               refresh=False,
                                               save=False,
                                               quit=False)
          self._needs_update: bool = False
          self._preview_buffer: Dict[str, np.ndarray] = {}
          self._images: Dict[str, Tuple[figure.Figure, Tuple[float, float]]] = {}
          self._resize_ids: List[Tuple[figure.Figure, int]] = []
          self._callbacks = dict(f="_toggle_size",
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 bugfix: Update preview screen in GUI 
scripts/train.py