Comments (2)
Hi @mridenour7,
For the melody task you mentioned, I just clone the repo and run python3 finetune.py --task=melody --name=default --ckpt='pretrain_model.ckpt'
, it works fine here for me.
And the state_dict
of saved checkpoint has keys like 'midibert.bert.embeddings.position_ids', 'midibert.in_linear.bias', 'classifier.1.weight'
.
A quick fix would be to change the following line to 'state_dict': self.model.state_dict(),
MIDI-BERT/MidiBERT/CP/finetune_trainer.py
Line 134 in 9679ab9
But I suppose the
state_dict
of the saved checkpoint would have keys like 'module.midibert.bert***'
then, and you'd have to be careful when loading the model for evaluation or your specific task.Something like the following,
Lines 165 to 171 in 9679ab9
Hope this helps!
from midi-bert.
@sophia1488 Thank you for the quick response! That fixed my error :)
from midi-bert.
Related Issues (11)
- How do I get the melody data of the dataset? HOT 6
- Install with Python3.11 HOT 1
- How to extend Velocity characters ? HOT 1
- How to convert the CP-Word of this project into MIDI ? HOT 3
- Classical Piano Compositions HOT 1
- Inference HOT 2
- make midi file from wav fomat HOT 3
- About the dataset. HOT 2
- about preprocess my own pretrain data HOT 7
- melody extraction gets empty output HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from midi-bert.