dc2825dfb20dbbd78a763b2db777d1bcbd32e9e6,TTS/vocoder/layers/wavegrad.py,UBlock,forward,#UBlock#,114

Before Change



        o = F.leaky_relu(x, 0.2)
        o = self.main_block1[0](o)
        o = shif_and_scale(o, scale, shift)
        o = F.leaky_relu(o, 0.2)
        o = self.main_block1[1](o)

        o = o + res
        res = o

        o = shif_and_scale(o, scale, shift)
        o = F.leaky_relu(o, 0.2)
        o = self.main_block2[0](o)
        o = shif_and_scale(o, scale, shift)
        o = F.leaky_relu(o, 0.2)
        o = self.main_block2[1](o)

        o = o + res
        return o


class DBlock(nn.Module):

After Change


        block1 = self.block1(block1)

        block2 = F.leaky_relu(x, 0.2)
        block2 = F.interpolate(block2, size=x.shape[-1] * self.factor)
        block2 = self.block2[0](block2)
        // block2 = film_shift + film_scale * block2
        block2 = shif_and_scale(block2, scale, shift)
        block2 = F.leaky_relu(block2, 0.2)
        block2 = self.block2[1](block2)

        x = block1 + block2

        // block3 = film_shift + film_scale * x
        block3 = shif_and_scale(x, scale, shift)
        block3 = F.leaky_relu(block3, 0.2)
        block3 = self.block3[0](block3)
        // block3 = film_shift + film_scale * block3
        block3 = shif_and_scale(block3, scale, shift)
        block3 = F.leaky_relu(block3, 0.2)
        block3 = self.block3[1](block3)

        x = x + block3
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: mozilla/TTS
Commit Name: dc2825dfb20dbbd78a763b2db777d1bcbd32e9e6
Time: 2020-10-29
Author: erogol@hotmail.com
File Name: TTS/vocoder/layers/wavegrad.py
Class Name: UBlock
Method Name: forward


Project Name: mozilla/TTS
Commit Name: dc2825dfb20dbbd78a763b2db777d1bcbd32e9e6
Time: 2020-10-29
Author: erogol@hotmail.com
File Name: TTS/vocoder/layers/wavegrad.py
Class Name: UBlock
Method Name: forward