Comments (5)
Use model = load_model('REAL.hdf5')
and model.save('REAL.hdf5')
from classical-piano-composer.
Use
model = load_model('REAL.hdf5')
andmodel.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.
Use
model = load_model('REAL.hdf5')
andmodel.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.
Thanks to @Utayaki . I was hit wit hthe same problem last night. Following the hint from @Utayaki , this is how I solved it.
- Made this change first
#from keras.models import Sequential
from keras.models import Sequential, load_model - In "train" function, changed reference to filepath:
#filepath = "weights-improvement-{epoch:02d}-{loss:.4f}-bigger.hdf5"
filepath = "Real.hdf5" - 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.
Made a pull request for this: #26
from classical-piano-composer.
Related Issues (20)
- A few issues (with solutions)
- Only one track, playing HOT 7
- Using weights trained on anohter computer HOT 1
- Nevermind
- Predicting the same note HOT 3
- randomSeed
- data file HOT 1
- ValueError(Shape error)
- ValueError(Shape error) while running predict.py iam getting this error. Anyone can help me,Thanks in advance HOT 15
- Can't Run with Tensorflow-gpu HOT 3
- Question about Parts used from the midi files
- Stuck on I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version HOT 2
- Accepting PRs?
- Alternate Instruments HOT 4
- np_utils is not defined
- music21.exceptions21.StreamException: HOT 3
- failed to find TimeSignature in meterStream; cannot process Measures HOT 1
- MIDI generated is just one note repeated HOT 4
- offset should be += 1 not += 0.5 in predict.py
- data/notes not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from classical-piano-composer.