Closed yongxuUSTC closed 7 years ago
I got same issue, too.
any idea?
I solved the problem by reinstalling keras from basveeling github. try to uninstall the keras and use it from basveeling's one
Yes, you are right. Tks
Doesn't work for me. I did $ pip uninstall keras $ pip install git+https://github.com/basveeling/keras.git $ KERAS_BACKEND=tensorflow python wavenet.py predict with models/run_20160920_120916/config.json predict_seconds=1
And I get the following error:
Using TensorFlow backend.
Traceback (most recent call last):
File "wavenet.py", line 23, in
Am I doing something wrong?
@ZmeiGorynych I don't think @basveeling's branch of Keras can fix the problem, I tried using it and it's just too old. Try installing the newest version and tell me what shows up.
newest version of Keras from PyPI?
Doesn't help I'm afraid:
ubuntu@ip-172-31-47-104:~/wavenet$ pip install keras -U
...
ubuntu@ip-172-31-47-104:~/wavenet$ KERAS_BACKEND=tensorflow python wavenet.py predict with models/run_20160920_120916/config.json predict_seconds=1
Using TensorFlow backend.
WARNING - root - Changed type of config entry "run_dir" from NoneType to unicode
WARNING - root - Changed type of config entry "optimizer.epsilon" from NoneType to float
INFO - wavenet - Running command 'predict'
WARNING - wavenet - No observers have been added to this run
INFO - wavenet - Started
INFO - predict - Using checkpoint from epoch: 358
INFO - predict - Saving to "models/run_20160920_120916/samples/sample_epoch-00358_01s__sample-temp-0.001_seed-946674575.wav"
ERROR - wavenet - Failed after 0:00:00!
Traceback (most recent calls WITHOUT Sacred internals):
File "wavenet.py", line 316, in predict
model = build_model()
File "wavenet.py", line 241, in build_model
name='initial_causal_conv')(out)
File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/keras/layers/convolutional.py", line 286, in __init__
bias=bias, **kwargs)
File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/keras/layers/convolutional.py", line 126, in __init__
super(Convolution1D, self).__init__(**kwargs)
File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py", line 326, in __init__
raise TypeError('Keyword argument not understood:', kwarg)
TypeError: ('Keyword argument not understood:', 'causal')
I noticed you're explicitly using TensorFlow. Is there a reason for that?
I mean, it's probably not the reason for the TypeError, but AFAIK the script doesn't like to work with TensorFlow...
No particular reason - ran into same issue when using Theano:
ubuntu@ip-172-31-47-104:~/wavenet$ KERAS_BACKEND=theano python wavenet.py predict with models/run_20160920_120916/config.json predict_seconds=1
Using Theano backend.
WARNING - root - Changed type of config entry "run_dir" from NoneType to unicode
WARNING - root - Changed type of config entry "optimizer.epsilon" from NoneType to float
INFO - wavenet - Running command 'predict'
WARNING - wavenet - No observers have been added to this run
INFO - wavenet - Started
INFO - predict - Using checkpoint from epoch: 358
INFO - predict - Saving to "models/run_20160920_120916/samples/sample_epoch-00358_01s__sample-temp-0.001_seed-946674575.wav"
ERROR - wavenet - Failed after 0:00:00!
Traceback (most recent calls WITHOUT Sacred internals):
File "wavenet.py", line 316, in predict
model = build_model()
File "wavenet.py", line 241, in build_model
name='initial_causal_conv')(out)
File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/keras/layers/convolutional.py", line 286, in __init__
bias=bias, **kwargs)
File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/keras/layers/convolutional.py", line 126, in __init__
super(Convolution1D, self).__init__(**kwargs)
File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py", line 326, in __init__
raise TypeError('Keyword argument not understood:', kwarg)
TypeError: ('Keyword argument not understood:', 'causal')
From what I can figure out (that is, not a lot), @basveeling used an argument (casual
) which is neither in his branch nor the master branch of Keras. The only thing I can think of (and this is probably a terrible solution) is removing casual=True,
from line 240 of wavenet.py
.
It's there in many places, and there's a specific comment that the function in question is in his keras fork. How the earlier commenters managed to make it work is a mystery to me ;) Oh well, unless someone can suggest a solution here I'll go for https://github.com/ibab/tensorflow-wavenet and https://github.com/tomlepaine/fast-wavenet instead :)
I'll take a look tomorrow, the causal flag was something I added in the wavenet branch of my keras fork, but I think I can arrange something with a lambda layer and use the main branch of keras.
On Wed, Jan 25, 2017, 18:34 Egor Kraev notifications@github.com wrote:
It's there in many places, and there's a specific comment that the function in question is in his keras fork. How the earlier commenters managed to make it work is a mystery to me ;) Oh well, unless someone can suggest a solution here I'll go for https://github.com/ibab/tensorflow-wavenet and https://github.com/tomlepaine/fast-wavenet instead :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/basveeling/wavenet/issues/22#issuecomment-275176042, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgxj0EEoAAifpag0M3Ji_Kdbp2nLnBpks5rV4eggaJpZM4LXGFC .
Were you able to solve it?
Hi! I've been running into some odd Theano errors, and I lack access to a GPU right now. I'll hopefully figure this out soon :).
I think my recent fix should solve this issue. Please let me know if it works :).
I failed to run the generation process:
(myVE) yx0001@balin:~/Downloads/wavenet/wavenet$ KERAS_BACKEND=theano python wavenet.py predict with models/run_20160920_120916/config.json predict_seconds=1 Using gpu device 6: GeForce GTX TITAN X (CNMeM is disabled, cuDNN 5005) Using Theano backend. WARNING - root - Changed type of config entry "run_dir" from NoneType to unicode WARNING - root - Changed type of config entry "optimizer.epsilon" from NoneType to float INFO - wavenet - Running command 'predict' WARNING - wavenet - No observers have been added to this run INFO - wavenet - Started INFO - predict - Using checkpoint from epoch: 358 INFO - predict - Saving to "models/run_20160920_120916/samples/sample_epoch-00358_01s__sample-temp-0.001_seed-946674575.wav" ERROR - wavenet - Failed after 0:00:00! Traceback (most recent calls WITHOUT Sacred internals): File "wavenet.py", line 316, in predict model = build_model() File "wavenet.py", line 241, in build_model name='initial_causal_conv')(out) File "/user/HS103/yx0001/myVE/local/lib/python2.7/site-packages/keras/layers/convolutional.py", line 260, in init bias=bias, kwargs) File "/user/HS103/yx0001/myVE/local/lib/python2.7/site-packages/keras/layers/convolutional.py", line 111, in init super(Convolution1D, self).init(kwargs) File "/user/HS103/yx0001/myVE/local/lib/python2.7/site-packages/keras/engine/topology.py", line 323, in init raise TypeError('Keyword argument not understood:', kwarg) TypeError: ('Keyword argument not understood:', 'causal')