GithubHelp home page GithubHelp logo

ValueError(Shape error) while running predict.py iam getting this error. Anyone can help me,Thanks in advance about classical-piano-composer HOT 15 OPEN

skuldur avatar skuldur commented on July 29, 2024
ValueError(Shape error) while running predict.py iam getting this error. Anyone can help me,Thanks in advance

from classical-piano-composer.

Comments (15)

zsheill7 avatar zsheill7 commented on July 29, 2024

hey! i'm having the same problem - did you happen to find a solution?
thanks!

from classical-piano-composer.

naganikshith04 avatar naganikshith04 commented on July 29, 2024

@zsheill7 Sorry , but i was unable to get a solution.Sed:(

from classical-piano-composer.

Skuldur avatar Skuldur commented on July 29, 2024

Hi,

This is due to inconsistencies between the model and the data you're using. If you make changes to the data then you have to train the model again so that you can generate songs.

from classical-piano-composer.

naganikshith04 avatar naganikshith04 commented on July 29, 2024

@Skuldur that means we need to train the model again?thank you.

from classical-piano-composer.

Skuldur avatar Skuldur commented on July 29, 2024

Yes, you need to train the model again using your data and then use the weights file generated by training the model to generate sequences of notes. :)

The weights I have included in the repository only works with the data that's provided in the repository.

from classical-piano-composer.

naganikshith04 avatar naganikshith04 commented on July 29, 2024

@Skuldur i was usung your weights and data you have provided ...but this error has arised.

from classical-piano-composer.

Skuldur avatar Skuldur commented on July 29, 2024

Okay, I'll look into this after work today. Finally have some time due to social isolation.

from classical-piano-composer.

naganikshith04 avatar naganikshith04 commented on July 29, 2024

@Skuldur Thankyou so much!

from classical-piano-composer.

Skuldur avatar Skuldur commented on July 29, 2024

Hi,

I just pulled the repository into a clean directory and running predict.py worked perfectly. Are you certain that you didn't make any changes to any file after clone the repository?

from classical-piano-composer.

naganikshith04 avatar naganikshith04 commented on July 29, 2024

@Skuldur Thankyou very much. I will again clone the repo and try it again sorry man! :).

from classical-piano-composer.

SutirthaChakraborty avatar SutirthaChakraborty commented on July 29, 2024

image

Still facing the issue, any clue? If I run a few epochs it works, any clue?

from classical-piano-composer.

Skuldur avatar Skuldur commented on July 29, 2024

If you change the dataset and the data/notes file then you have to retrain the model because the amount of different notes and chords will differ from what the model is expecting.

from classical-piano-composer.

shaswat-du avatar shaswat-du commented on July 29, 2024

Hi @Skuldur. The Weights doesn't fit the model used in the predict.py. It has nothing to do with the data set. Could you share the model you used for training? That'll be very helpful. Thanks.

from classical-piano-composer.

Skuldur avatar Skuldur commented on July 29, 2024

Hi,

I just pulled the repository into a clean environment on my work computer and

  1. Running predict.py directly worked perfectly.
  2. Training a model using lstm.py and using the weights from that model in predict.py worked perfectly.

Are you certain that you didn't make any changes to any file after clone the repository? Predict.py uses data/notes to get information on dimensions. If you run lstm.py, that file gets overwritten with information corresponding to your current dataset.

from classical-piano-composer.

trulee0913 avatar trulee0913 commented on July 29, 2024

I think it is not a problem of coding. It is the problem of communication.
For these who get the value error, simple open predict.py and make following changes should help.
After we train the model, we will get new weights file called weights improvement or something like that.
Simple replace the name of this file to weights.hdf5 should solve the issue. Have a nice music. This programe is awesome.

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.