def compile(self, gen_model, dis_model, gen_optimizer, dis_optimizer, pqmf):
        super().compile(gen_model, dis_model, gen_optimizer, dis_optimizer)
        # define loss
        self.mse_loss = tf.keras.losses.MeanSquaredError()
        self.mae_loss = tf.keras.losses.MeanAbsoluteError()
        self.sub_band_stft_loss = TFMultiResolutionSTFT(**self.config["subband_stft_loss_params"])
        self.full_band_stft_loss = TFMultiResolutionSTFT(**self.config["stft_loss_params"])

        # define pqmf module
        self.pqmf = pqmf
Example #2
0
    def compile(self, gen_model, dis_model, gen_optimizer, dis_optimizer,
                pqmf):
        super().compile(gen_model, dis_model, gen_optimizer, dis_optimizer)
        # define loss
        self.sub_band_stft_loss = TFMultiResolutionSTFT(
            **self.config["subband_stft_loss_params"])
        self.full_band_stft_loss = TFMultiResolutionSTFT(
            **self.config["stft_loss_params"])

        # define pqmf module
        self.pqmf = pqmf
 def compile(self, gen_model, dis_model, gen_optimizer, dis_optimizer):
     super().compile(gen_model, dis_model, gen_optimizer, dis_optimizer)
     # define loss
     self.stft_loss = TFMultiResolutionSTFT(
         **self.config["stft_loss_params"])
     self.mse_loss = tf.keras.losses.MeanSquaredError(
         reduction=tf.keras.losses.Reduction.NONE)
     self.mae_loss = tf.keras.losses.MeanAbsoluteError(
         reduction=tf.keras.losses.Reduction.NONE)
Example #4
0
 def compile(self, gen_model, dis_model, gen_optimizer, dis_optimizer):
     super().compile(gen_model, dis_model, gen_optimizer, dis_optimizer)
     # define loss
     self.stft_loss = TFMultiResolutionSTFT(
         **self.config["stft_loss_params"])