d5f47b3c3ba8afda509c36fbdc958d2b1ec25f7f,cube/models/vocoder.py,BeeCoder,learn,#BeeCoder#Any#Any#Any#,83

Before Change


            batch_y = torch.tensor(y).reshape(len(x), self.UPSAMPLE_COUNT).to(device)
            y_pred = self.network(batch_x)
            // loss = self.criterion.forward(y_pred, batch_y.to(device))
            loss = (y_pred - batch_y).pow(2).sum() / len(x)
            loss.backward()
            self.trainer.step()
            total_loss += loss

After Change


            batch_x = torch.tensor(x).reshape(len(x), 1, 60).float().to(device)
            batch_y = torch.tensor(y).reshape(len(x), self.UPSAMPLE_COUNT).to(device)
            y_pred = self.network(batch_x)
            fft_orig = torch.rfft(batch_y, 1)
            fft_pred = torch.rfft(y_pred, 1)
            eps = 1e-8
            loss = torch.abs(torch.abs(fft_orig) - torch.abs(fft_pred)).sum()
            angle_orig = torch.atan(fft_orig)
            angle_pred = torch.atan(fft_pred)
            loss += torch.abs(angle_pred - angle_orig).sum()
            loss += (y_pred - batch_y).pow(2).sum()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: tiberiu44/TTS-Cube
Commit Name: d5f47b3c3ba8afda509c36fbdc958d2b1ec25f7f
Time: 2018-11-06
Author: boros@adobe.com
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: learn


Project Name: tiberiu44/TTS-Cube
Commit Name: c896658601de967992b8fd40e81d42a924360db1
Time: 2018-11-05
Author: tibi@racai.ro
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: learn


Project Name: tiberiu44/TTS-Cube
Commit Name: ab967e887ab37a3c15652f1e03aa7f490e3b1ebd
Time: 2018-11-05
Author: tibi@racai.ro
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: learn


Project Name: tiberiu44/TTS-Cube
Commit Name: d5f47b3c3ba8afda509c36fbdc958d2b1ec25f7f
Time: 2018-11-06
Author: boros@adobe.com
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: learn