Ghadjeres / DeepBach

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

Input midi file got TypeError: part_to_inputs() missing 1 required positional argument: 'length' #51

Closed zijing-wu closed 5 years ago

zijing-wu commented 6 years ago

Hi, First, thank you for the great work! I followed the first a few examples to train the models and got some outputs with default raw dataset. Now, I would like to input my own .mid file but face the error:

Traceback (most recent call last): File "deepBach.py", line 183, in main() File "deepBach.py", line 125, in main note2index=note2indexes[0]) TypeError: part_to_inputs() missing 1 required positional argument: 'length'

I noticed #43 also encountered the same problem but there seems not to have new commits after the issue. I am wondering if any updates will be available soon? Also, I found that #6 also tried to supplied customer melody but was able to get valid outputs. May I know if some older versions of the project work? Would you suggest using an old version to get it work with -m option for now?

Thank you!

tqjxlm commented 6 years ago

The version at this commit Fixes #20 seems to work (with the provided god_save_the_queen.mid file).

But I can't get as good results as in the demos using the "--ext big" models explained in the examples. It is even worse if I use the pretrained model. Maybe there's some parameter tuning work to do, or there are further essential improvements after that commit.

Ghadjeres commented 5 years ago

Hi, I just pushed a new PyTorch version. I hope that this solves your problems. The architecture has not been optimized at all but it still gives decent results.