Assuming you have the noise signal and clean signal as NumPy arrays and using PyTorch and ResNet18 as the deep learning framework and model, respectively, here's one way to preprocess and load the data:
main.py1361 chars43 lines
Then, you can use this dataloader
to load the data in batches for training ResNet18 or any other deep learning model. In each iteration, the dataloader will provide a dictionary of 'noisy' and 'clean' signals that you can feed to the model as input and output, respectively.
gistlibby LogSnag