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

ValueError: Expect BinaryTrack or StandardTrack, but got <class 'pypianoroll.track.Track'>. #8

Open
avani-031 opened this issue Dec 21, 2020 · 8 comments

Comments

@avani-031
Copy link

File "/usr/local/lib/python3.6/dist-packages/pypianoroll/outputs.py", line 139, in to_pretty_midi
f"Expect BinaryTrack or StandardTrack, but got {type(track)}."
ValueError: Expect BinaryTrack or StandardTrack, but got <class 'pypianoroll.track.Track'>.

### How do I debug this error?

@salu133445
Copy link
Owner

Hi, please downgrade pypianoroll to 0.5.3. Thanks.

@avani-031
Copy link
Author

Hi sir,
I am getting this error on downgrading.
File "/content/drive/.shortcut-targets-by-id/436/bmusegan/musegan/utils/midi_io.py", line 54, in write_midi
Multitrack.append(multitrack,track)
AttributeError: type object 'Multitrack' has no attribute 'append'

@salu133445
Copy link
Owner

It's Multitrack.append_track(multitrack,track) not Multitrack.append(multitrack,track). You probably have modified this line when debugging the above bug.

Note - Multitrack.append_track is renamed to Multitrack.append in Pypianoroll 1.0.0. The code in this repository is written using Pypianoroll <1.

@avani-031
Copy link
Author

Thank you sir!

@avani-031
Copy link
Author

When training starts it gets stuck at 2020-12-22 08:39:14.828929: W tensorflow/core/framework/allocator.cc:108] Allocation of 278003712 exceeds 10% of system memory.

I tried reducing the batch size from 32 to 15, 10 but on doing that it says cannot reshape ____ into array of (___)
Can you please help me with this sir

@salu133445
Copy link
Owner

This TensorFlow warning is not so meaningful actually. One common cause for hanging is when the training data exceeds the RAM size (see salu133445/musegan#99 and salu133445/musegan#100). Another common cause is when the model is not trained on a GPU. It might take more than 10 minutes per iteration on a CPU, but it generally takes less than 10 seconds on a GPU (see salu133445/musegan#33).

@salu133445
Copy link
Owner

You might want to run the latest code in the musegan repository, which also supports the BinaryMuseGAN model yet more updated.

@avani-031
Copy link
Author

Thank you so much sir!

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