18857c333e04b6815ec1f2ab9fcec1c0a0ae7bfd,cube/models/vocoder.py,BeeCoder,__init__,#BeeCoder#Any#Any#Any#,25

Before Change


class BeeCoder:
    def __init__(self, params, model=None, runtime=False):
        self.params = params
        self.HIDDEN_SIZE = [448, 448]

        self.FFT_SIZE = 513
        self.UPSAMPLE_COUNT = int(12.5 * params.target_sample_rate / 1000)

        self.sparse = False
        if model is None:
            self.model = dy.Model()
        else:
            self.model = model
        input_size = self.UPSAMPLE_COUNT + self.params.mgc_order
        hidden_w = []
        hidden_b = []
        for layer_size in self.HIDDEN_SIZE:
            hidden_w.append(self.model.add_parameters((layer_size, input_size)))
            hidden_b.append(self.model.add_parameters((layer_size)))
            input_size = layer_size

        // self.networks.append([hidden_w, hidden_b])

        self.mlp = [hidden_w, hidden_b]

        self.output_w = self.model.add_parameters((2, input_size))
        self.output_b = self.model.add_parameters((2))

        self.trainer = dy.AdamTrainer(self.model, alpha=params.learning_rate)

After Change


class BeeCoder:
    def __init__(self, params, model=None, runtime=False):
        self.params = params
        self.HIDDEN_SIZE = [1024, 1024]

        self.FFT_SIZE = 513
        self.UPSAMPLE_COUNT = int(12.5 * params.target_sample_rate / 1000)

        self.sparse = False
        if model is None:
            self.model = dy.Model()
        else:
            self.model = model
        input_size = self.UPSAMPLE_COUNT + self.params.mgc_order

        self.upsample_w = []
        self.upsample_b = []
        for ii in range(self.UPSAMPLE_COUNT):
            self.upsample_w.append(self.model.add_parameters((self.params.mgc_order, self.params.mgc_order)))
            self.upsample_b.append(self.model.add_parameters((self.params.mgc_order)))

        hidden_w = []
        hidden_b = []
        for layer_size in self.HIDDEN_SIZE:
            hidden_w.append(self.model.add_parameters((layer_size, input_size)))
            hidden_b.append(self.model.add_parameters((layer_size)))
            input_size = layer_size

        // self.networks.append([hidden_w, hidden_b])

        self.mlp = [hidden_w, hidden_b]

        self.mean_w = self.model.add_parameters((1, input_size))
        self.mean_b = self.model.add_parameters((1))
        self.stdev_w = self.model.add_parameters((1, input_size))
        self.stdev_b = self.model.add_parameters((1))

        self.trainer = dy.AdamTrainer(self.model, alpha=params.learning_rate)
        self.dio = DatasetIO()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 17

Instances


Project Name: tiberiu44/TTS-Cube
Commit Name: 18857c333e04b6815ec1f2ab9fcec1c0a0ae7bfd
Time: 2018-11-01
Author: tibi@racai.ro
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: __init__


Project Name: tiberiu44/TTS-Cube
Commit Name: 18857c333e04b6815ec1f2ab9fcec1c0a0ae7bfd
Time: 2018-11-01
Author: tibi@racai.ro
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: __init__


Project Name: tiberiu44/TTS-Cube
Commit Name: 288e2868ce5f35a9c8ecf3e3fa913f293adcf7e7
Time: 2018-10-31
Author: boros@adobe.com
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: __init__


Project Name: tiberiu44/TTS-Cube
Commit Name: 2c6ce0ebfa9537246878e8fb9144e0c879fca17d
Time: 2018-10-22
Author: tibi@racai.ro
File Name: cube/models/vocoder.py
Class Name: BeeCoder
Method Name: __init__