diff --git a/.DS_Store b/.DS_Store index 22942f911..fad07c5b4 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/audio_data.py b/audio_data.py index e79ca35be..77272a8a9 100644 --- a/audio_data.py +++ b/audio_data.py @@ -185,7 +185,7 @@ def __init__(self, *args, **kwargs): self.conditioning_channels = conditioning_channels print("Conditioning captures time scales ranging from " + str(self.min_conditioning_breadth) + " to " \ - + str(self.min_conditioning_breadth * self.conditioning_channels) + " seconds") + + str(self.min_conditioning_breadth * self.conditioning_channels // 2) + " seconds") super().__init__(*args, **kwargs) @@ -199,8 +199,10 @@ def conditioning(self, file_index, position_in_file, item_length): x = np.linspace(phase_start, phase_start + phase_length, num=conditioning_count) conditioning = np.zeros((self.conditioning_channels, conditioning_count)) - for c in range(self.conditioning_channels): - conditioning[c, :] = np.cos(x * ((c + 1) / self.conditioning_channels)) + frequency_count = self.conditioning_channels // 2 + for c in range(frequency_count): + conditioning[2 * c, :] = np.cos(x * ((c + 1) / frequency_count)) + conditioning[2 * c + 1, :] = np.sin(x * ((c + 1) / frequency_count)) file_encoding = np.zeros((len(self.files), conditioning_count)) file_encoding[file_index, :] = 1. diff --git a/wavenet_model.py b/wavenet_model.py index 0d033326e..eacfae25a 100644 --- a/wavenet_model.py +++ b/wavenet_model.py @@ -383,7 +383,7 @@ def __init__(self, args_dict): self.file_encoding_layers.append(nn.Conv1d(in_channels=self.file_encoding_channels[i], out_channels=self.file_encoding_channels[i + 1], kernel_size=1, - bias=False)) + bias=self.use_bias)) self.conditioning_layers = nn.ModuleList() self.file_conditioning_cross_layers = nn.ModuleList() @@ -396,7 +396,7 @@ def __init__(self, args_dict): self.file_conditioning_cross_layers.append(nn.Conv1d(in_channels=self.file_encoding_channels[-1], out_channels=self.conditioning_channels[i], kernel_size=1, - bias=False)) + bias=self.use_bias)) def activation_unit_init(self): super().activation_unit_init()