Ghadjeres / DeepBach

code accompanying "DeepBach: a Steerable Model for Bach Chorales Generation" paper
MIT License
500 stars 131 forks source link

AssertionError when running Flask #41

Closed McElaine closed 6 years ago

McElaine commented 6 years ago

When running Flask server after setting FALSK_APP, I got this error. Any ideas on how to handle this? Thanks a lot in advance.

screen shot 2018-01-25 at 3 02 52 pm
Ghadjeres commented 6 years ago

The problem comes from the fact that the server is unable to find the models. See for instance the section on the import error issues and make sure you have models in the models/ dir.

McElaine commented 6 years ago

I modified a path in plugin_flask_server.py and got it work. Thanks again!

Ghadjeres commented 6 years ago

Hi, thanks for your interest. In fact, the algorithm is the classical Gibbs sampling method (except that we use approximations of the conditional probability distributions instead of the true conditionals of a probability distribution on whole sequences). Concerning (1) there is an example in my thesis https://drive.google.com/open?id=17KOeg4TW2cFWQ0RZP2T73qcM5rTVBGNG in Sect. 6.2.3.4 that is (I hope) a clearer way of demonstrating this. Best

2018-01-31 23:01 GMT+01:00 SinceThen notifications@github.com:

Hi Ghadjere, hope you're doing great and thanks again for the last answer. I have another question about the alg you proposed. I'm a novice in this field and wonder what would happen if we simply use classical Gibbs sampling or Metropolis-Hasting sampler? I noticed that the paper mentioned that in section 2.3.4 '(1) using Gibbs fails to sample the true joint distribution when variables are highly correlated, (2) creating isolated regions of high probability states where the MCMC can be trapped'. I could understand (2), just not very clear with (1). Thank you very much in advance for your time. I really appreciate your help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ghadjeres/DeepBach/issues/41#issuecomment-362085614, or mute the thread https://github.com/notifications/unsubscribe-auth/AQY2mBmxaOhCtCFjmORScFD8AjP4YHGtks5tQOK0gaJpZM4Rta2k .

McElaine commented 6 years ago

Thank you very much! Sir, that’s very helpful!

Have a good day!

Elaine

On Feb 1, 2018, at 5:15 AM, Gaetan Hadjeres notifications@github.com<mailto:notifications@github.com> wrote:

Hi, thanks for your interest. In fact, the algorithm is the classical Gibbs sampling method (except that we use approximations of the conditional probability distributions instead of the true conditionals of a probability distribution on whole sequences). Concerning (1) there is an example in my thesis https://drive.google.com/open?id=17KOeg4TW2cFWQ0RZP2T73qcM5rTVBGNG in Sect. 6.2.3.4 that is (I hope) a clearer way of demonstrating this. Best

2018-01-31 23:01 GMT+01:00 SinceThen notifications@github.com<mailto:notifications@github.com>:

Hi Ghadjere, hope you're doing great and thanks again for the last answer. I have another question about the alg you proposed. I'm a novice in this field and wonder what would happen if we simply use classical Gibbs sampling or Metropolis-Hasting sampler? I noticed that the paper mentioned that in section 2.3.4 '(1) using Gibbs fails to sample the true joint distribution when variables are highly correlated, (2) creating isolated regions of high probability states where the MCMC can be trapped'. I could understand (2), just not very clear with (1). Thank you very much in advance for your time. I really appreciate your help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ghadjeres/DeepBach/issues/41#issuecomment-362085614, or mute the thread https://github.com/notifications/unsubscribe-auth/AQY2mBmxaOhCtCFjmORScFD8AjP4YHGtks5tQOK0gaJpZM4Rta2k .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Ghadjeres/DeepBach/issues/41#issuecomment-362220675, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AX9SUDkNw0lFNtiVUe6hy-4zj68RfhGGks5tQY7BgaJpZM4Rta2k.