Giter Club home page Giter Club logo

Comments (5)

Utayaki avatar Utayaki commented on July 29, 2024

Use model = load_model('REAL.hdf5') and model.save('REAL.hdf5')

from classical-piano-composer.

 avatar commented on July 29, 2024

Use model = load_model('REAL.hdf5') and model.save('REAL.hdf5')

Sorry, but I'm new and I'm not really familiar with Keras. My question is, is the REAL.hdf5 the same thing as the weight generated during each checkpoint? Is it any different with files generated by model.save?

from classical-piano-composer.

Utayaki avatar Utayaki commented on July 29, 2024

Use model = load_model('REAL.hdf5') and model.save('REAL.hdf5')

Sorry, but I'm new and I'm not really familiar with Keras. My question is, is the REAL.hdf5 the same thing as the weight generated during each checkpoint? Is it any different with files generated by model.save?

Real.hdf5 is a name of MODEL, note weight. That's just the name of the model. And the code model.save gives you an opportunity to save it. And the next time you can load it with load.model(*name of your model*)

My code now looks like

`#保存とする調整

model = load_model('Real.hdf5')


history = model.fit(network_input, network_output, epochs=36, batch_size=2048, validation_split=0.2, callbacks=callbacks_list)


model.save('Real.hdf5')`

from classical-piano-composer.

ashokrs avatar ashokrs commented on July 29, 2024

Thanks to @Utayaki . I was hit wit hthe same problem last night. Following the hint from @Utayaki , this is how I solved it.

  1. Made this change first
    #from keras.models import Sequential
    from keras.models import Sequential, load_model
  2. In "train" function, changed reference to filepath:
    #filepath = "weights-improvement-{epoch:02d}-{loss:.4f}-bigger.hdf5"
    filepath = "Real.hdf5"
  3. Couple of lines below, in the same "train" function, did this
    model = load_model('Real.hdf5')
    model.fit(network_input, network_output, epochs=200, batch_size=64, callbacks=callbacks_list)
    model.save('Real.hdf5')

This enabled me to save the model as "Real.hdf5". When the # of epochs runs completes. Copy "Real.hdf5" as "weights.hdf5" and run "python3 predict.py" to generate the output knowing the cost functions reflecting the error rate. Closer to ZERO provides a better result.

If you want to continue the training, just restart by running "python3 lstm.py".

good luck!

from classical-piano-composer.

binary-person avatar binary-person commented on July 29, 2024

Made a pull request for this: #26

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.