basveeling / wavenet

Keras WaveNet implementation
https://soundcloud.com/basveeling/wavenet-sample
1.06k stars 219 forks source link

Can't train network, basveeling's branch of Keras didn't help #24

Closed Sobsz closed 7 years ago

Sobsz commented 7 years ago

I wanted to train the network on my own .wav files. I downloaded all the .py files, put the .wav files in the data/test and data/train directories, and ran wavenet.py without any arguments (as is shown in the readme). However, it apparently tried to predict using a nonexistent model:

WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to exe
cute optimized C-implementations (for both CPU and GPU) and will default to Pyth
on implementations. Performance will be severely degraded. To remove this warnin
g, set Theano flags cxx to an empty string.
Using Theano backend.
INFO - wavenet - Running command 'main'
WARNING - wavenet - No observers have been added to this run
INFO - wavenet - Started
Configuration (modified, added, typechanged):
  batch_size = 16
  data_dir = 'test'
  data_dir_structure = 'flat'
  debug = False
  desired_sample_rate = 4410
  dilation_depth = 9
  early_stopping_patience = 20
  final_l2 = 0
  fragment_length = 1152
  fragment_stride = 128
  keras_verbose = 1
  learn_all_outputs = True
  nb_epoch = 1000
  nb_filters = 256
  nb_output_bins = 256
  nb_stacks = 1
  predict_initial_input = ''
  predict_seconds = 1
  predict_use_softmax_as_input = False
  random_train_batches = False
  randomize_batch_order = True
  res_l2 = 0
  run_dir = None
  sample_argmax = False
  sample_temperature = 1.0
  seed = 476062113
  test_factor = 0.1
  train_only_in_receptive_field = True
  train_with_soft_target_stdev = None
  use_bias = False
  use_skip_connections = True
  use_ulaw = True
  optimizer:
    decay = 0.0
    epsilon = None
    lr = 0.001
    momentum = 0.9
    nesterov = True
    optimizer = 'sgd'
INFO - main - Running with seed 476062113
ERROR - wavenet - Failed after 0:00:00!
Traceback (most recent calls WITHOUT Sacred internals):
  File "C:\Python34\lib\site-packages\wrapt\wrappers.py", line 522, in __call__
    args, kwargs)
  File "wavenet.py", line 471, in main
    os.mkdir(run_dir)
FileNotFoundError: [WinError 3] System nie może odnaleźć określonej ścieżki: 'models\\run_20170123_174859'

(the last line says it can't find the path) After a bit of trial and error, I decided to install basveeling's branch of Keras (I installed the official one previously). However, that only worsened the situation:

WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to exe
cute optimized C-implementations (for both CPU and GPU) and will default to Pyth
on implementations. Performance will be severely degraded. To remove this warnin
g, set Theano flags cxx to an empty string.
Using Theano backend.
Traceback (most recent call last):
  File "wavenet.py", line 23, in <module>
    from keras.callbacks import ModelCheckpoint, EarlyStopping, ReduceLROnPlatea
u, CSVLogger
ImportError: cannot import name 'ReduceLROnPlateau'

I'm using Windows 7 64-bit without SP1. My Python version is Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSCv.1600 32 bit (Intel)] on win32.

Sobsz commented 7 years ago

Well, this is embarassing... It turns out that the models directory has to exist. Issue closed.