GithubHelp home page GithubHelp logo

Comments (4)

mehrzeller avatar mehrzeller commented on September 4, 2024 3

you can use CuDNNLSTM instead :
from keras.layers import CuDNNLSTM
instead of
from keras.layers import LSTM
don't forget to change all your LSTM statements in the source code

from classical-piano-composer.

kevaday avatar kevaday commented on September 4, 2024

Also, I tried using your text generating LSTM but it's also very slow on my GPU, it takes about 1 hour to do one epoch. Shouldn't my GPU be a lot faster at training?

from classical-piano-composer.

kevaday avatar kevaday commented on September 4, 2024

Thanks mehrzeller,
actually, it's a coincidence because I was just looking at the keras recurrent layers site and just saw that there's such thing
but thanks anyways

from classical-piano-composer.

victor-felicitas avatar victor-felicitas commented on September 4, 2024

For new Keras versions specifying CuDNNLSTM is obsolete.
Training is slow because with recurrent_dropout >0 CUDNN can not be used.

From Keras documentation:
"The requirements to use the cuDNN implementation are:
activation == tanh
recurrent_activation == sigmoid
recurrent_dropout == 0
unroll is False
use_bias is True
Inputs, if use masking, are strictly right-padded.
Eager execution is enabled in the outermost context."

I suggest changing the model by adding dropout layer instead, after each LSTM layer

from classical-piano-composer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.