yatingmusic / compound-word-transformer Goto Github PK
View Code? Open in Web Editor NEWOfficial implementation of compound word transformer (AAAI'21)
License: GNU General Public License v3.0
Official implementation of compound word transformer (AAAI'21)
License: GNU General Public License v3.0
Hi, thanks for amazing work.
I am currently working on generating custom dataset by converting multiple mp3 files to MIDI & CPs.
And checked google magenta's onsets and frames you mentioned.
I want to convert about 1K mp3 files into MIDIs at once, but their scripts seems to support only wav format.
It would be better if it supports mp3 format because it is much lighter than wavs.
Also I am not sure whether the scripts work well with 1k files at once.
If it is okay, could you share some tips how you transcribed multiple files?
Thanks.
how can I use compound word with transformer-xl ?
can you share your evaluation code in conditional situation ?
When is the planned date for releasing the conditional generation code? Happy to help if needed, thanks!
Excuse me, when I run the programme (no matter main-cp.py or compile.py), it says " FileNotFoundError: [Errno 2] No such file or directory: 'ailab17k_from-scratch_cp\dictionary.pkl' ".But when I check the directory, I can't find " dictionary.pkl " in " ailab17k_from-scratch_cp " So, how can I solve this problem?
Thank you.
Sorry for bothering you, I have some issue in using synchronizer.py.
There's some successful samples when I used it, but for some samples, the .mid files generated by synchronizer.py will much longer than the original midi, and all of the longer time is filled up with silence, I'd like to ask what's the problem in this situation?
Hi, this is not a crucial problem at all, but I found a typo in the code of main-cp.py.
The lines from 623 to 634 are
loss = epoch_loss
if 0.4 < loss <= 0.8:
fn = int(loss * 10) * 10
saver_agent.save_model(net, name='loss_' + str(fn))
elif 0.05 < loss <= 0.30:
fn = int(loss * 100)
saver_agent.save_model(net, name='loss_' + str(fn))
elif loss <= 0.05:
print('Finished')
return
else:
saver_agent.save_model(net, name='loss_high')
This means that, when the loss is between 0.3 and 0.4, the model is saved as 'loss_high', not as 'loss_31', 'loss_35' etc.
So, the first elif condition should be like this?
elif 0.05 < loss <= 0.40:
The code in Colab notebook !gdown --id 1qw_tVUntblIg4lW16vbpjLXVndkVtgDe
does not work out. I needed to download the file and upload it manually instead.
Here is the error I received:
_/usr/local/lib/python3.8/dist-packages/gdown/cli.py:127: FutureWarning: Option --id
was deprecated in version 4.3.1 and will be removed in 5.0. You don't need to pass it anymore to use a file ID.
warnings.warn(
Access denied with the following error:
Cannot retrieve the public link of the file. You may need to change
the permission to 'Anyone with the link', or have had many accesses._
Hello there, I was wondering if this torch implementation of Remi XL can be finetuned as the original Remi project, I tried generating my own dataset representations and resume the training with it but seems like the dictionary changed and I cannot continue training the original dataset. Using the original dictionary crashes the training and using the new one is not allowed due a change in the model (different n_token value in config.yaml). I tried several times and I was also not able to finetune the CP successfully.
Training from scratch in both implementations is working fine, thanks for it! 👍🏼
Hello I want to use your AIlabs.tw Pop1K7 dataset for scientific research tasks, but the download link provided is no longer valid, can you provide a new download link, thank you very much!
When I finish configuring fast transformer and running the code, there is an error with the content of TypeError: ‘NoneType‘ object is not callable. Can you help me answer it?
Thanks for this interesting work. I want to check the generation results of the model however, the link is corrupted.
I'm working on something related to computer music these days and notice your compelling work. However, when I downloaded your source code and tried to run the model, I got this error.
num of classes: [56, 135, 18, 3, 87, 18, 25]
>>>>>: [56, 135, 18, 3, 87, 18, 25]
n_parameters: 39,016,630
num_batch: 406
train_x: (1625, 3584, 7)
train_y: (1625, 3584, 7)
train_mask: (1625, 3584)
Traceback (most recent call last):
File "D:/Documents/科研/computer music/baseline/compound-word-transformer-main/compound-word-transformer-main/workspace/uncond/cp-linear/main-cp.py", line 711, in <module>
train()
File "D:/Documents/科研/computer music/baseline/compound-word-transformer-main/compound-word-transformer-main/workspace/uncond/cp-linear/main-cp.py", line 586, in train
losses = net.train_step(batch_x, batch_y, batch_mask)
File "D:/Documents/科研/computer music/baseline/compound-word-transformer-main/compound-word-transformer-main/workspace/uncond/cp-linear/main-cp.py", line 302, in train_step
h, y_type = self.forward_hidden(x)
File "D:/Documents/科研/computer music/baseline/compound-word-transformer-main/compound-word-transformer-main/workspace/uncond/cp-linear/main-cp.py", line 367, in forward_hidden
h = self.transformer_encoder(pos_emb, attn_mask) # y: b x s x d_model
File "C:\Users\liujiahe\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\liujiahe\anaconda3\envs\pytorch\lib\site-packages\fast_transformers\transformers.py", line 138, in forward
x = layer(x, attn_mask=attn_mask, length_mask=length_mask)
File "C:\Users\liujiahe\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\liujiahe\anaconda3\envs\pytorch\lib\site-packages\fast_transformers\transformers.py", line 77, in forward
x = x + self.dropout(self.attention(
File "C:\Users\liujiahe\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\liujiahe\anaconda3\envs\pytorch\lib\site-packages\fast_transformers\attention\attention_layer.py", line 103, in forward
new_values = self.inner_attention(
File "C:\Users\liujiahe\anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\liujiahe\anaconda3\envs\pytorch\lib\site-packages\fast_transformers\attention\causal_linear_attention.py", line 98, in forward
V = causal_linear(
File "C:\Users\liujiahe\anaconda3\envs\pytorch\lib\site-packages\fast_transformers\attention\causal_linear_attention.py", line 23, in causal_linear
V_new = causal_dot_product(Q, K, V)
File "C:\Users\liujiahe\anaconda3\envs\pytorch\lib\site-packages\fast_transformers\causal_product\__init__.py", line 44, in forward
CausalDotProduct.dot[device.type](
TypeError: 'NoneType' object is not callable
I used the AILabs.tw Pop17K dataset you provide and changed nothing but the path. I can't figure out what's wrong. Hope you can help me. Thank you!
Can you give me some detial version about cuda, pytorch, numpy et.
Because i had some trouble with the installation fast_transformer
Hi there,
Thanks for the implementation! Appreciate if you could share more insight on why there's no valiadtion/test set involved during training?
Best,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.