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

Confusion about the calculation of model parameters #8

Open
yagehu702 opened this issue Nov 13, 2024 · 2 comments
Open

Confusion about the calculation of model parameters #8

yagehu702 opened this issue Nov 13, 2024 · 2 comments

Comments

@yagehu702
Copy link

Hello, I see that the number of parameters of the HLTP teacher model is 149.50K and the number of parameters of the student model is 85.97K in Table IV of your paper. Could you please make your parameter calculation code public? Because the number of parameters I calculated myself is quite large. Looking forward to your reply.
image

@Petrichor625
Copy link
Owner

Thank you for your interest in our work!

Regarding your question about the parameter count, it seems that there may be an issue with how the parameters were calculated on your end. The parameter counting process we used is fairly straightforward, relying on standard packages for testing, so we didn't explicitly include this code in the repository.

I would recommend double-checking your method for counting the parameters. You can try using built-in functions in libraries like PyTorch (e.g., torchsummary.summary() or model.parameters()), which should give you an accurate count of the model parameters.

@yagehu702
Copy link
Author

Thank you for your interest in our work!

Regarding your question about the parameter count, it seems that there may be an issue with how the parameters were calculated on your end. The parameter counting process we used is fairly straightforward, relying on standard packages for testing, so we didn't explicitly include this code in the repository.

I would recommend double-checking your method for counting the parameters. You can try using built-in functions in libraries like PyTorch (e.g., torchsummary.summary() or model.parameters()), which should give you an accurate count of the model parameters.

Hello, I used the following parameter code:
total_params = sum(p.numel() for p in net.parameters())
print(f"Total parameters: {total_params / 1e3:.2f}K"),

But the obtained teacher model has 2908.65K parameters, which is quite different from the 149.50K in your paper. Is there something wrong with my code? Looking forward to your reply.

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