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

Bugs repair please~ #2

Closed
pengfeiZhao1993 opened this issue Jul 2, 2021 · 3 comments
Closed

Bugs repair please~ #2

pengfeiZhao1993 opened this issue Jul 2, 2021 · 3 comments

Comments

@pengfeiZhao1993
Copy link

Hi, buddy, there are a lot of bugs that I cannot run the "train-supernet.py" successfully !

model settings issue in train_supernet.py

In addition, there is one imported model >from model.supermodel import BertForSequenceClassification
And you try to create teacher_model and super_model with the same SuperModel (SuperEmbedding, SuperLinear, SuperLayerNorm) setting?

@skzhang1
Copy link
Collaborator

skzhang1 commented Jul 2, 2021

The teacher_model is just a used for further distillation, but in our implementation we do not use it as you can see in our code, so please ignore it. And we set the config of superBERT using the function set_sample_config , so this two models are different. I will make the code clearer in the next few days.

@pengfeiZhao1993
Copy link
Author

Ok, certainly. I notice that.
Thank you for your early reply.

Some minor mistakes in this code.

  1. call torch.nn.Dataparallel twice, one in main function , and another call in train(). so you doubly pack the super_model, resulting in the >line 253 "super_model.module.set_sample_config()" ineffective.
  2. In Multi-GPU training, there is a error: >RuntimeError: Input, output and indices must be on the current device.
  3. load train_dataset twice.
    hope to help you to speed up.

Look forward to your codes soon.

@skzhang1
Copy link
Collaborator

skzhang1 commented Jul 2, 2021

Thanks for your suggestions!I will repair it in the future version.

@skzhang1 skzhang1 closed this as completed Jul 2, 2021
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