Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError when use another database #36

Closed
playsboy opened this issue Aug 10, 2017 · 1 comment
Closed

AssertionError when use another database #36

playsboy opened this issue Aug 10, 2017 · 1 comment

Comments

@playsboy
Copy link

playsboy commented Aug 10, 2017

Dear Professor:

I follow your introduction, and have stored mid files with the same number of voices in data folder. When I run the command: python3 deepBach.py --dataset data/ --ext dowland -t 30 --timesteps 32 -u 256 256 -d 256 -b 32 in server, it shows

Traceback (most recent call last):
File "deepBach.py", line 183, in
main()
File "deepBach.py", line 156, in main
metadatas=metadatas, timesteps=timesteps)
File "/home/DeepBach-master/DeepBach/model_manager.py", line 644, in create_models
labels) = next(gen)
File "/home/DeepBach-master/DeepBach/data_utils.py", line 410, in generator_from_raw_dataset
chorale_indices) > 0, "The list of chorales for the phase '%s' must not be empty" % phase
AssertionError: The list of chorales for the phase 'train' must not be empty.

I print the training_size and total_size in data_utils.py, and it appears 0. I don't know where is wrong. Would you mind to tell me what should I do if it is convenient. I'm very grateful to you for your help.

@Ghadjeres
Copy link
Owner

Hi,
This is probably because your files do not contain 4 different voices:
there is a default value of 4 for the number of voices in filter_file_list which shouldn't be there...
This will be fixed tomorrow. In the meantime you can remove the if statement or change the num_voices variable in filter_file_list.
Do not forget to remove the old and empty pickle file in datasets/custom_dataset if you want it to be recomputed.
(otherwise it's an issue with the dataset path, best would be to give it as an absolute path).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants