mazzzystar / WaveGAN-pytorch

PyTorch implementation of " Synthesizing Audio with Generative Adversarial Networks"
https://arxiv.org/abs/1802.04208
64 stars 15 forks source link

Assertion error on splitting data #1

Closed RahulBhalley closed 6 years ago

RahulBhalley commented 6 years ago

Thank you so much for sharing this code! 🍻But I'm stuck because of some data splitting assertion. Please rectify this error and thanks in advance. 😄

/Users/rahulbhalley/anaconda2/lib/python2.7/site-packages/librosa/core/audio.py:37: UserWarning: Could not import scikits.samplerate. Falling back to scipy.signal
  warnings.warn('Could not import scikits.samplerate. '
/Users/rahulbhalley/Desktop/WaveGAN-pytorch/utils.py:14: UserWarning: 
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

The backend was *originally* set to 'MacOSX' by the following code:
  File "train.py", line 5, in <module>
    from utils import save_samples
  File "/Users/rahulbhalley/Desktop/WaveGAN-pytorch/utils.py", line 7, in <module>
    import librosa
  File "/Users/rahulbhalley/anaconda2/lib/python2.7/site-packages/librosa/__init__.py", line 18, in <module>
    from . import display
  File "/Users/rahulbhalley/anaconda2/lib/python2.7/site-packages/librosa/display.py", line 19, in <module>
    import matplotlib.pyplot as plt
  File "/Users/rahulbhalley/anaconda2/lib/python2.7/site-packages/matplotlib/pyplot.py", line 71, in <module>
    from matplotlib.backends import pylab_setup
  File "/Users/rahulbhalley/anaconda2/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 16, in <module>
    line for line in traceback.format_stack()

  matplotlib.use('agg')
No handlers could be found for logger "wavegan"
/Users/rahulbhalley/Desktop/WaveGAN-pytorch/wavegan.py:54: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
  nn.init.kaiming_normal(m.weight.data)
/Users/rahulbhalley/Desktop/WaveGAN-pytorch/wavegan.py:158: UserWarning: nn.init.kaiming_normal is now deprecated in favor of nn.init.kaiming_normal_.
  nn.init.kaiming_normal(m.weight.data)
[INFO] Saving configurations...
[INFO] Loading audio data...
Traceback (most recent call last):
  File "train.py", line 70, in <module>
    args['test_ratio'], batch_size)
  File "/Users/rahulbhalley/Desktop/WaveGAN-pytorch/utils.py", line 115, in split_data
    assert num_valid > 0 and num_test > 0 and num_train > 0
AssertionError
mazzzystar commented 6 years ago

@rahulbhalley Have you downloaded sc09Wav DATASET and put it below your current repo?

RahulBhalley commented 6 years ago

I do place it in the same repo but the name of downloaded folder is sc09. To resolve this issue I just have to change the folder's name to sc09Wav and it works!

And thanks for this PyTorch implementation! 🔥

mazzzystar commented 6 years ago

@rahulbhalley Thanks for your appreciation ! I've changed the DATASET name from sc09Wav to sc09 😄