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
Tensor error #3
Comments
Sure, I will review it shortly. |
Hi @asigalov61, two small problems. First, regarding the Second, regarding the parameters, I think there are small problems.
I make the last note in your import chorderator as cdt
if __name__ == '__main__':
cdt.set_melody('melody.mid')
cdt.set_meta(tonic=cdt.Key.F)
cdt.set_segmentation('A8B8')
cdt.set_texture_prefilter((0, 2))
cdt.set_note_shift(0)
cdt.set_output_style(cdt.Style.POP_STANDARD)
cdt.generate_save('output_results') |
@billyblu2000 Yes, it worked! :) Thank you very much for your help yet again! I have a few questions though... Why did you recommend to set A8B8? And lastly, I wanted to ask you if you plan to automate melody preparation and control settings? Again, thank you for your explanations and help. Alex |
@asigalov61 You are welcome!
The melody has 16 bars, the first 8 bars have one motive, and the last 8 bars have another motive. Apparently, they should have different phrase names. There are two options for us to choose:
There are ways to automate this process. Previous research has proposed different MIR algorithms regarding tonic, mode estimation, melody segmentation, etc. Unfortunately, this is not the focus of this research. At least at the current stage, we are not planning to add those modules. We might do it in the future but please don't count on us. You can seek other projects that are doing this and combine it with AccoMontage2. Billy |
@billyblu2000 Great! Thank you for your clarifications and your response :) |
@billyblu2000 PS. I was able to successfully make a production track from this melody/generated output. Take a listen if you like: https://soundcloud.com/aleksandr-sigalov-61/musenet-pop-composition-1 This is raw AccoMontage2 output continued by OpenAI's MuseNet. Once again, thank you very much for your work. It produces very good, production quality results. :) Alex |
Your music is extremely beautiful! Thank you for your interest in AccoMontage2. |
Hey @billyblu2000
I am getting a strange tensor error on my test melody. So I was wondering if you can help me out to figure out what I am doing wrong...
Here is the traceback:
Searching for Phrase 1 Searching for Phrase 2 Searching for Phrase 3 Reference chosen: [(144, '倒带'), (144, '倒带'), (144, '倒带')] Pitch Transposition (Fit by Model): [-3, 2, 2] Generating... Traceback (most recent call last): File "demo.py", line 14, in <module> cdt.generate_save(demo_name + '_output_results') File "/content/AccoMontage2/chorderator/interaction.py", line 91, in generate_save return _core.generate_save(output_name=output_name, task=task, log=log, wav=wav, **kwargs) File "/content/AccoMontage2/chorderator/core.py", line 392, in generate_save log=True, **kwargs) File "/content/AccoMontage2/chorderator/core.py", line 361, in generate gen = self.run(cut_in, cut_in_arg, with_texture, **kwargs) File "/content/AccoMontage2/chorderator/core.py", line 294, in run **kwargs) File "/content/AccoMontage2/chorderator/utils/pipeline.py", line 62, in send_in self.final_output = self.__add_textures(self.chord_gen_output, self.final_output_log, **kwargs) File "/content/AccoMontage2/chorderator/utils/pipeline.py", line 113, in __add_textures processor.solve() File "/content/AccoMontage2/chorderator/utils/models/accomontage/AccoMontage.py", line 122, in solve midi = render_acc(piano_roll, chord_table, query_seg, path, shift, acc_pool, state_dict=self.state_dict) File "/content/AccoMontage2/chorderator/utils/models/accomontage/util_tools/AccoMontage.py", line 248, in render_acc est_x = model.inference(pr_matrix, gt_chord, sample=False) File "/content/AccoMontage2/chorderator/utils/models/accomontage/models/model.py", line 139, in inference dec_z = torch.cat([z_chd, z_rhy], dim=-1) RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 10 but got size 8 for tensor number 1 in the list.
My demo.py file is setup as such:
`import chorderator as cdt
if name == 'main':
And the melody MIDI is attached.
Thank you.
melody.zip
The text was updated successfully, but these errors were encountered: