Comments (1)
I see that you are mixing the MOCKINGJAY
class with your own downstream solver modified from either mockingjay/solver.py
or downstream/solver.py
.
I believed most of the errors are from the above modification.
The problem with model before the actual attributes is probably caused by the model initialization method.
I see that you initialized like this:
self.mockingjay = MOCKINGJAY(options=options, inp_dim=160).to(self.device)
If you examine the code of MOCKINGJAY, the actual model is assigned to the attribute self.model
So you should save like this, as you have discovered:
'Mockingjay': self.mockingjay.model.state_dict()
I've realized our example_extract_finetune.py
missed the attribute while saving (which probably mislead you, sorry about that),
I will fix it in the next update, thanks for pointing it out!
As to your parameters mismatch problem:
Warnings are only thrown when model architecture does not match the weight.
For example, loading a 3-layer model weight into a 12-layer model.
By the look of it,
the MOCKINGJAY
class builds a 12-layer model (85425408 parameters), and you are loading a 3-layer model weight (21388800 parameters) with your solver, which causes the error.
When you save with this:
all_states = {
'Classifier': self.classifier.state_dict(),
'Mockingjay': self.mockingjay.model.state_dict(),
'Optimizer': self.optimizer.state_dict(),
'Global_step': self.global_step,
'Settings': {
'Config': self.config,
'Paras': self.paras,
},
}
The 'Config': self.config
probably specifies a 12-layer model,
while the 'Mockingjay': self.mockingjay.model.state_dict()
saves the weight of a 3-layer model.
Then when you later loads with the MOCKINGJAY
class,
it uses 'Config': self.config
to construct a 12-layer model, and loads the 3-layer weight,
which causes the warning.
Please verify if this is the case,
Let me know if you have further problems.
Thanks.
from s3prl.
Related Issues (20)
- University Work: Mispronunciation Detection HOT 3
- i dont think the paper distilhubert is clear. HOT 4
- Asking for how to use pretrained weight of Hugging Face models in downstream tasks. HOT 7
- An error occurrs when adding new downstream tasks. HOT 7
- Feature request for Language Identification on ML-SUPERB dataset HOT 5
- Multiresolution HuBERT as a new upstream HOT 7
- No module named 's3prl.superb' HOT 1
- Is this required for the SS and SE task? assert abs(feat_list[i].size(0) - length_list[i]) < 5. I am getting this error for wav2vec HOT 6
- Different upstream and downstream learning rates HOT 1
- ValueError: mutable default <class 's3prl.upstream.roberta.roberta_model.EncDecBaseConfig'> for field encoder is not allowed: use default_factory HOT 3
- Not able to submit the results. HOT 4
- The rules for conformity for emotion recognition. HOT 5
- Potential SpecAug Issue HOT 1
- What is the accept rate in the VC task evaluation output? HOT 1
- a question about two-stage downstream task HOT 1
- ASVspoof Dateset Support HOT 2
- Requesting to add CLSRIL-23 pretrained model as new upstream HOT 6
- Cannot submit my results in the leaderboard HOT 4
- Document link broken HOT 1
- Broken link HOT 4
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 s3prl.