After checking the memory usage after each mel spectrogram transform it seems that every example is adding 1-2MB to the total RAM used (for MelSpectrogram, Spectrogram seems to use around half of that), still haven’t got a clue why it is happening. It seems that using the functional transformation (torchaudio.functional.spectrogram in the case of torchaudio.transforms.Spectrogram, which is called in the Spectrogram class for the actual transformation) does not add to the amount of RAM used, which makes it even weirder for me. If anyone has any idea I’d really appreciate any thoughts/ideas.