Created
August 27, 2020 00:35
-
-
Save mirth/5591d1b6d8da2142d8d85c4ed31a179f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NoiseDataSet(Dataset): | |
def __init__(self, X, y): | |
super().__init__() | |
assert(len(X) == len(y)) | |
self.X = X | |
self.y = y | |
def __len__(self): | |
return len(self.X) | |
def __getitem__(self, idx): | |
filename = self.X[idx] | |
wav = wavfile_to_examples(filename) | |
wav = wav.cuda() | |
target = self.y[idx] | |
return wav, target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment