def __init__(self, wrnn_dims, fc_dims, cond_channels, global_cond_channels): super().__init__() conv_channels = 128 rnn_channels = 512 self.warmup_steps = 64 self.conv0 = Conv4(1, conv_channels, global_cond_channels) self.conv1 = Conv4(conv_channels, conv_channels, global_cond_channels) self.conv2 = Conv4(conv_channels, conv_channels, global_cond_channels) self.rnn0 = RNN4(conv_channels + cond_channels, rnn_channels, self.warmup_steps, global_cond_channels) self.rnn1 = RNN4(conv_channels + rnn_channels, rnn_channels, self.warmup_steps, global_cond_channels) self.rnn2 = RNN4(conv_channels + rnn_channels, rnn_channels, self.warmup_steps, global_cond_channels) self.wavernn = WaveRNN(wrnn_dims, fc_dims, rnn_channels + global_cond_channels, 0) self.delay_c0 = 9 self.delay_c1 = self.delay_c0 + 9 * 4 self.delay_c2 = self.delay_c1 + 9 * 16 self.delay_r0 = self.delay_c2 + self.warmup_steps * 64 self.delay_r1 = self.delay_r0 + self.warmup_steps * 16 self.delay_r2 = self.delay_r1 + self.warmup_steps * 4 self.delay_wr = self.delay_r2 + self.warmup_steps cond_delay = self.delay_wr - self.delay_c2 if cond_delay % 64 != 0: raise RuntimeError(f'Overtone: bad cond delay: {cond_delay}') self.cond_pad = cond_delay // 64
def __init__(self, rnn_dims, fc_dims, pad, upsample_factors, feat_dims, DEVICE="cuda"): super().__init__() self.n_classes = 256 self.upsample = UpsampleNetwork(feat_dims, upsample_factors, DEVICE=DEVICE) self.wavernn = WaveRNN(rnn_dims, fc_dims, feat_dims, 0, DEVICE=DEVICE) self.num_params() self.DEVICE = DEVICE
def __init__(self, quantization_channels=256, gru_channels=896, fc_channels=896, lc_channels=80, upsample_factor=(5, 5, 8), use_gru_in_upsample=True): super().__init__() self.upsample = ConvInUpsampleNetwork(upsample_scales=upsample_factor, upsample_activation="none", upsample_activation_params={}, mode="nearest", cin_channels=lc_channels, use_gru=use_gru_in_upsample) self.wavernn = WaveRNN(quantization_channels, gru_channels, fc_channels, lc_channels)
def __init__(self, quantization_channels=256, gru_channels=896, fc_channels=896, lc_channels=80, lc_out_channles=80, upsample_factor=(5, 5, 8), use_lstm=True, lstm_layer=2, upsample_method='duplicate'): super().__init__() self.frame_net = FrameRateNet(lc_channels, lc_out_channles) self.upsample = UpsampleNet(input_size=lc_out_channles, output_size=lc_out_channles, upsample_factor=upsample_factor, use_lstm=use_lstm, lstm_layer=lstm_layer, upsample_method=upsample_method) self.wavernn = WaveRNN(quantization_channels, gru_channels, fc_channels, lc_channels) self.num_params()