wavenet icon indicating copy to clipboard operation
wavenet copied to clipboard

Working with Keras 2.0

Open agulli opened this issue 7 years ago • 5 comments

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

agulli avatar Apr 03 '17 14:04 agulli

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).

basveeling avatar Apr 06 '17 09:04 basveeling

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

agulli avatar Apr 13 '17 15:04 agulli

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.

basveeling avatar Apr 16 '17 12:04 basveeling

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

jerpint avatar Aug 25 '17 20:08 jerpint

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

imdatceleste avatar Dec 07 '17 11:12 imdatceleste