You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import torch.multiprocessing as mp
def get_mean_and_std_4channel(dataset):
'''Compute the mean and std value of dataset.'''
mp.set_start_method('spawn') # set multiprocessing context to 'spawn'
dataloader = torch.utils.data.DataLoader(dataset, batch_size=1, shuffle=True, num_workers=2, multiprocessing_context='spawn')
mean = torch.zeros(4)
However , the cuda also dumped because out of memory, for the 380*400 resolution, batch size =2, channel=3, nfft =2048, but i set trainable Mel and stft both are False.
It takes 23 G cuda memory,
so, is there any method reduce the cuda memory cost
The text was updated successfully, but these errors were encountered:
I am not sure how is your dataset written.
Have you tried putting the nnAudio after the dataloader instead of inside it? What is the memory required if you do it like this?
i.e. you load a batch of waveforms first, then use nnAudio to convert that batch of waveforms into spectrograms.
Is any friend meet this situation,
i already solve this problem :
by using
However , the cuda also dumped because out of memory, for the 380*400 resolution, batch size =2, channel=3, nfft =2048, but i set trainable Mel and stft both are False.
It takes 23 G cuda memory,
so, is there any method reduce the cuda memory cost
The text was updated successfully, but these errors were encountered: