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

代码有问题 #1

Open
Daner-Wang opened this issue Mar 23, 2022 · 4 comments
Open

代码有问题 #1

Daner-Wang opened this issue Mar 23, 2022 · 4 comments

Comments

@Daner-Wang
Copy link

依赖都已经安装,不存在依赖的问题,但是代码运行时还是各种乱七八糟的错,有些错误在编辑器里就能明显看到,希望上传能够正确运行的代码,以及作者所展示的最优结果的log文件。

@Daner-Wang
Copy link
Author

image
We eliminated some errors in the code and tried to reproduce the author's experiment with the parameters given by the author, however, the experimental results were far different from those in the paper. In author‘s paper, the proportion of remained FLOPs in deit-tiny is 49.23%, while in our reproducing the proportion is more than 70%, which is confusing. In addition, we also found that the author's calculation of FLOPS might be wrong in the given code.
image

@billysx
Copy link
Collaborator

billysx commented May 22, 2022

Sorry for the late reply.
We promise we will finish cleaning the code by the end of the next week and upload the full fixed codes.

@billysx
Copy link
Collaborator

billysx commented May 30, 2022

Thank you for pointing out the issues in our codebase, our response to your problems are as follows:

  1. We’ve pushed a new version of our cleaned code without running errors after all dependencies are installed. Apologies for the running errors.
  2. Thank you for pointing out that the calculation of FLOPs of the fourth term should be multiplied by r_ratio instead of r_ratio$^2$. Actually, the result of DeiT-Small and DeiT-Base are all using r_ratio instead of r_ratio$^2$ for calculation. We only preserve the experiment results of DeiT-Small, provided with a full-scheduled training log updated under the file "log/", please check. As seen in the screen shot, the best accuracy is 78.82% with remained FLOPs percentage 50.41% as the finetuned model.
  3. As for the calculation of FLOPs, due to multi-version of organizing the code, the numbers for DeiT-Tiny are under investigation. We will provide an update as soon as possible.

Screen Shot 2022-05-30 at 1 34 14 AM

@billysx
Copy link
Collaborator

billysx commented Jul 7, 2022

Update Jul. 7th: new logs of DeiT-Tiny and DeiT-Base
For DeiT-Tiny, it’s 49.23% in the paper, the reproduce result is 48.45% at epoch 9 in the screenshot. Which is not exactly the same but are very close.

Screen Shot 2022-07-05 at 3 57 48 PM

Screen Shot 2022-07-05 at 3 59 16 PM

For DeiT-Base, it’s 45.5% in the paper, the reproduce result has a 42% model at epoch 17, and a 50% model at epoch 19.
Although these two results are not exactly the same numbers as it is in the paper(randomness), these two proves that the problem of cannot compressing to 50% FLOPs is not there.
For DeiT-Base, using a different z-learning-rate schedule "5,10,15,20,25" can get the result.

Screen Shot 2022-07-05 at 3 59 27 PM

Screen Shot 2022-07-05 at 4 01 21 PM

Screen Shot 2022-07-05 at 4 02 24 PM

The logs that are mentioned are under file log/.

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