    def _load_weights(self):
        """
        Loads the pretrained weights from the given path, if any is provided.
        If a discriminator is defined, does the same.
        """

        if self.weights_generator:
            self.model.get_layer('generator').load_weights(str(self.weights_generator))

        if self.discriminator:
            if self.weights_discriminator:
                self.model.get_layer('discriminator').load_weights(str(self.weights_discriminator))
                self.discriminator.model.load_weights(str(self.weights_discriminator))
Loads the pretrained weights from the given path, if any is provided.
If a discriminator is defined, does the same.
ISR/train/trainer.py