andabi / music-source-separation

Deep neural networks for separating singing voice from music written in TensorFlow
795 stars 150 forks source link

ValueError: Sample larger than population or is negative #13

Open RahulRagesh opened 6 years ago

RahulRagesh commented 6 years ago

File "train.py", line 95, in train() File "train.py", line 44, in train mixed_wav, src1_wav, src2wav, = data.next_wavs(TrainConfig.SECONDS, TrainConfig.NUM_WAVFILE) File "D:\Machine Learning\Blind Audio Source Separation\Andabi\music-source-separation-master\data.py", line 22, in next_wavs wavfiles = random.sample(wavfiles, size) File "C:\Users\RAHUL\Anaconda3\lib\random.py", line 317, in sample raise ValueError("Sample larger than population or is negative") ValueError: Sample larger than population or is negative

I get this error on running train.py

divyamamgai commented 6 years ago

Check config.py, you need to modify the DATA_PATH in TrainConfig class.

ucasiggcas commented 5 years ago

Check config.py, you need to modify the DATA_PATH in TrainConfig class.

Dear,

How to correct the DATA_PATH with auther's dataset ?

Thx

alishibli97 commented 4 years ago

Have you got any solutions yet ? What should we change to ?

Navids71 commented 4 years ago

hello every one, it means that number of your sample is larger than the file which you want to sample it, in this case that file name is 'wavfiles' in this source code

for solving this problem

just change this wavfiles = [] to wavfiles = ['address or directory of the wav file that you want to separate it'] in data.py file

have a good time.