philipperemy / keras-tcn

Keras Temporal Convolutional Network.
MIT License
1.88k stars 455 forks source link

Can this be used with tensorflow.keras? #28

Closed swilson314 closed 5 years ago

swilson314 commented 5 years ago

Can this be used with tensorflow.keras, i.e., can I use the usual keras -> tensorflow.keras substitution?

philipperemy commented 5 years ago

@swilson314 that's a good question and I don't have the answer. I would say yes. Can you try and let me know?

swilson314 commented 5 years ago

@philipperemy will do :)

swilson314 commented 5 years ago

@philipperemy Small update, got code running but ran into error. Will keep you updated: https://stackoverflow.com/questions/53660808/stepping-into-python-code-keras-with-visual-studio-2017

philipperemy commented 5 years ago

@swilson314 seems like tensorflow.keras does not even support CAUSAL....

swilson314 commented 5 years ago

@philipperemy I think maybe it does per below, and the source. My guess is that some pre-validation routine hasn't been updated.

https://www.tensorflow.org/versions/r1.10/api_docs/python/tf/keras/layers/Conv1D

padding: One of "valid", "causal" or "same" (case-insensitive). "causal" results in causal (dilated) convolutions, e.g. output[t] does not depend on input[t+1:]. Useful when modeling temporal data where the model should not violate the temporal order. See WaveNet: A Generative Model for Raw Audio, section 2.1.

philipperemy commented 5 years ago

Yes it's probably that @swilson314

philipperemy commented 5 years ago

At the moment, it's probably better to just:

pip install tensorflow-gpu
pip install keras