basveeling / wavenet

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

Working with Keras 2.0 #29

Open agulli opened 7 years ago

agulli commented 7 years ago

Hi Bas, have you tried to make this working with K2.0?

basveeling commented 7 years ago

No, but with the legacy changes it would probably work just fine. Do note that I've pushed causal 1d convolutions to keras, but with a different api (using the padding parameter).

agulli commented 7 years ago

Can you explain what you mean? I am having issues in making it working on V2.

basveeling commented 7 years ago

Keras provides a legacy layer that should make it easy to run keras v1 code on keras v2. Feel free to post any tracebacks and errors here.

jerpint commented 6 years ago

Hi,

I am trying to train using the provided code. One thing I notice is that when running train.py, I get the following error: Traceback (most recent call last): File "wavenet.py", line 27, in <module> from wavenet_utils import CausalAtrousConvolution1D, categorical_mean_squared_error File "/home/jerpint/Documents/wavenet/wavenet_utils.py", line 3, in <module> from keras.utils.np_utils import conv_output_length ImportError: cannot import name conv_output_length Fixing line 3 in wavenet_utils.py from

from keras.utils.np_utils import conv_output_length

to

from keras.utils.conv_utils import conv_output_length

I get the following error :

Traceback (most recent call last): File "wavenet.py", line 27, in <module> from wavenet_utils import CausalAtrousConvolution1D, categorical_mean_squared_error File "/home/jerpint/Documents/wavenet/wavenet_utils.py", line 12, in <module> class CausalAtrousConvolution1D(AtrousConvolution1D): TypeError: Error when calling the metaclass bases function() argument 1 must be code, not str I am unsure how to solve this issue...

I am using keras V2.0.3 and Python 2.7

imdatceleste commented 6 years ago

Hi @jerpint et. al.: I have created a Keras-2.1 experimental version and am testing it. I will continue testing, but I thought you might want to have a look here at Keras2-Wavenet