def CollectLossFromHistory(self):
    '\n        This method collect the loss metric data from the history.\n        '
    try:
        loss_val: str = 'loss'
        if (loss_val in self._history_keys):
            self._losses = [s for s in self._history_keys if (loss_val == s)]
            self._val_losses = [s for s in self._history_keys if (('val' + loss_val) in s)]
            self._epochs = len(self._history.epoch)
            if ((len(self._losses) == 0) or (len(self._val_losses) == 0)):
                print('Loss is missing in history')
                return
            if (isNotNone(self._losses) and isNotNone(self._val_losses)):
                self._history_keys_list.remove(loss_val)
                self._history_keys_list.remove(('val_' + loss_val))
                print('Found losses in history!')
    except Exception as ex:
        template = 'An exception of type {0} occurred in [HistoryPlotter.CollectLossFromHistory]. Arguments:\n{1!r}'
        message = template.format(type(ex).__name__, ex.args)
        print(message)
This method collect the loss metric data from the history.
def CollectLossFromHistory(self):
    '\n        \n        '
    try:
        loss_val: str = 'loss'
        if (loss_val in self._history_keys):
            self._losses = [s for s in self._history_keys if (loss_val == s)]
            self._val_losses = [s for s in self._history_keys if (('val' + loss_val) in s)]
            self._epochs = len(self._history.epoch)
            if ((len(self._losses) == 0) or (len(self._val_losses) == 0)):
                print('Loss is missing in history')
                return
            if (isNotNone(self._losses) and isNotNone(self._val_losses)):
                self._history_keys_list.remove(loss_val)
                self._history_keys_list.remove(('val_' + loss_val))
                print('Found losses in history!')
    except Exception as ex:
        template = 'An exception of type {0} occurred in [HistoryPlotter.CollectLossFromHistory]. Arguments:\n{1!r}'
        message = template.format(type(ex).__name__, ex.args)
        print(message)