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

how to get layer_mappings for distillation? #1590

Open
Michael-Fuu opened this issue Feb 1, 2024 · 1 comment
Open

how to get layer_mappings for distillation? #1590

Michael-Fuu opened this issue Feb 1, 2024 · 1 comment
Assignees

Comments

@Michael-Fuu
Copy link

hi, I want to write scripts to print layer_mappings for distillation, my script like this:
for name, module in model.named_modules(): print(name)
while the results is far away from default layer_mapping. For example, when I use resnet50, the default result is [['resblock.1.feature.output', 'resblock.deepst.feature.output'], while my result is something like layer1.0.conv1. How to define the correct layer_mapping?

@XinyuYe-Intel
Copy link
Contributor

Hi @Michael-Fuu , are you looking at this self distillation example? As you can see in the code below, this example does not follow the layer names (such as layer1.0.conv1 you mentioned) of original model (e.g. resnet50) for layer mapping, it creates layer names (such as resblock.1.feature.output) not related to the original model.
image

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