MusicGenerator icon indicating copy to clipboard operation
MusicGenerator copied to clipboard

Finds no model

Open Eumi opened this issue 7 years ago • 11 comments

I get this error when i type in "main.py --test --sample_length 500"

Warning: No model found in 'C:\save/model'. Please train a model before trying to predict The End! Thanks for using this program

but theres something in there..i allready trained it and it saved ..and theres something in the folder =/ pls help im so close.

Eumi avatar Apr 10 '17 22:04 Eumi

What is the content of C:\save/model exactly ?

Conchylicultor avatar Apr 10 '17 23:04 Conchylicultor

the folders "progression, test and train" than files named "checkpoint", "model.ckpt.data-00000-of-00001","model.ckpt.index" , "model.ckpt.meta" and "params"

"model.ckpt.data-00000-of-00001" , shouldnt that be a higher number? i let it run to 4000 epochs . In "progression" are files named "4000-test-0" and so on.

Eumi avatar Apr 11 '17 05:04 Eumi

my training data in cmd looksl ike this.

------- Epoch 5 (lr=0.0001) ------- Subsampling the songs (train)... Shuffling the dataset... Generating batches... Subsampling the songs (test)... Shuffling the dataset... Generating batches... Training: 100%|##########################################################################| 1/1 [00:02<00:00, 2.07s/it] Epoch finished in 0:00:02.071642

Eumi avatar Apr 11 '17 06:04 Eumi

also when i delete the "save" folder from C:\ i get the error message File "C:\python35\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 469, in raise_exception_on_not_ok_status pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: C:/save/model\train

i did that by hand and created the folder model (in save folder) and opened it ....and in the folder model i created train ...than i run main.py and it puts stuff in it. ...maybe that is an error as well idk ...i have no idea of programming sry =,O

i really hope you can help me with this hopefully last problem! I also made an administrator account and it failed....than i tried to change root_dir but it has the same error =,O

seriously, i would be so grateful if u know how i can fix this =)

Eumi avatar Apr 11 '17 08:04 Eumi

same problem with linux .... but i figured out my graphic card is not this ..3.0 ready for cuda ..wich it would need to run it =O only 2.3 or so ..is that the problem?

Eumi avatar Apr 11 '17 17:04 Eumi

I think there is a bug with this version of the program due to TF 1.0 new saver format.

On Tue, Apr 11, 2017, 19:57 Eumi [email protected] wrote:

same problem with linux .... but i figured out my graphic card is not this ..3.0 ready for cuda ..wich it would need to run it =O only 2.3 or so ..is that the problem?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Conchylicultor/MusicGenerator/issues/6#issuecomment-293346839, or mute the thread https://github.com/notifications/unsubscribe-auth/AIoNO1yV1kRkMg5JdKWSGFGvW5raf7joks5ru78ZgaJpZM4M5bAB .

Conchylicultor avatar Apr 11 '17 18:04 Conchylicultor

so i cant do anything? or do i need to use another version of tensorflow and than its fixed? i just have it installed for this program only

Eumi avatar Apr 11 '17 18:04 Eumi

You can try this hack: create an empty file named "model.ckpt" inside the "save/model/" directory where your model files are.

Even if this works, I think you're putting too​ much effort into this. You can only be disappointed when you will see the results, as I already told you.

On Tue, Apr 11, 2017, 20:29 Eumi [email protected] wrote:

so i cant do anything? or do i need to use another version of tensorflow and than its fixed? i just have it installed for this program only

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/Conchylicultor/MusicGenerator/issues/6#issuecomment-293357854, or mute the thread https://github.com/notifications/unsubscribe-auth/AIoNO37XzujyMyRXPGHci6pfDeyZzv5Xks5ru8aSgaJpZM4M5bAB .

Conchylicultor avatar Apr 11 '17 21:04 Conchylicultor

HAHA !! it works =D im so lucky thanks <3 ..you are right the output is not so good for now ...but it definitely does something ... i had a look at the midi files (one of them) and it definitely looks like chords ...i am impressed and very thankful for your help =D ( i saved my progress before i started to play around with it, and imported it back) this is awesome...and only the fact that it is working now is already a relief =) i will try different inputs with it (already figured out a way how i can download midi files and edit them so the program imports them =) ) great work! thumbs up for u!

Eumi avatar Apr 12 '17 14:04 Eumi

Creating the model.ckpt file leads to some music being generated. But what does this mean? Is it learning from the files that have been used for training? Shouldn't it be using the checkpoint file that has been saved during training instead?

erikamenezes avatar Aug 17 '17 18:08 erikamenezes

@erikamenezes yes, this is frustrating. it is a beautiful program, but it goes to waste when saver format is outdated. the owner should update it.

on composer.py I've changed this constant:

self.MODEL_EXT = '.meta'

and inside _main_test() (line 327), I did this:

saver = tf.train.import_meta_graph('save/model/model.ckpt.meta')
saver.restore(self.sess, tf.train.latest_checkpoint('save/model/.'))
            

this seems to work, still depending on further investigation on results.

my tensorflow version for this environment is 1.2, and some minor tweaks in tf syntax were also necessary.

patalanov avatar Dec 19 '17 03:12 patalanov