if self.prediction_mode not in ['Dense','Last', 'None']:
            raise ConfigurationError("Invalid 'prediction_mode' (current '{}', available {})".format(self.prediction_mode, ['Dense','Last', 'None']))