    def _load_weights(self):
        """ Invokes the model's load weights function if any weights are provided. """
        if self.weights_path is not None:
            self.logger.info('Loaded weights from \n > {}'.format(self.weights_path))
            # loading by name automatically excludes the vgg layers
            self.model.model.load_weights(str(self.weights_path))
        else:
            self.logger.error('Error: Weights path not specified (check config file).')
            raise ValueError('Weights path not specified (check config file).')

        session_config_path = self.weights_path.parent / 'session_config.yml'
        if session_config_path.exists():
            conf = yaml.load(session_config_path.read_text(), Loader=yaml.FullLoader)
        else:
            self.logger.warning('Could not find weights training configuration')
            conf = {}
        conf.update({'pre-trained-weights': self.weights_path.name})
        return conf
Invokes the model's load weights function if any weights are provided.
ISR/predict/predictor.py