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

在DIV2K上训练时间比DF2K长 #16

Open
DX3906ghh opened this issue Dec 2, 2024 · 25 comments
Open

在DIV2K上训练时间比DF2K长 #16

DX3906ghh opened this issue Dec 2, 2024 · 25 comments

Comments

@DX3906ghh
Copy link

作者您好,我在复现完您的RGT论文后,尝试在DIV2K数据集上进行训练,但是我发现训练时间会比DF2K长很多,请问您知道为什么吗?我用四张V100训练DF2K需要13天左右,但是用同样的gpu训练DIV2K需要23天。

@zhengchen1999
Copy link
Owner

请问除了数据集,您调整过其他的训练配置(yml)吗。
如果没有,那可能是您服务器的I/O速度较慢,训练期间,DIV2K数据集读入次数更多,增加运行时间。实际上,RGT训练大概3-5天即可。
您可以设置yml: dataset_enlarge_ratio: 100来减少I/O次数。

@DX3906ghh
Copy link
Author

谢谢您的回复。是的,除了数据集我没有调整过其他训练配置。请问dataset_enlarge_ratio可以减少到多少呢?有范围吗?

@zhengchen1999
Copy link
Owner

没有范围,dataset_enlarge_ratio越大,内存占用越多,但是读取数据集的次数就会越少。因此只要内存允许,可以设置的很大。

@DX3906ghh
Copy link
Author

好的,谢谢您的回复。我去调整一下yml文件。再次感谢您的回复!

@DX3906ghh
Copy link
Author

您好,通过调整dataset_enlarge_ratio的值,训练时间变短了,谢谢您的指导!

@Kang341281X
Copy link

您好,请问测试的yml文件中是否可以用dataset_enlarge_ratio来缩短测试时间??

@zhengchen1999
Copy link
Owner

不可以,dataset_enlarge_ratio与测试设置无关。

@Kang341281X
Copy link

好的,感谢您的回答。

@DX3906ghh
Copy link
Author

作者您好,我设置dataset_enlarge_ratio的值分别为1、5、10、20,发现到了5的时候,RGT在DF2K上的训练时间已经到了瓶颈了(预计训练时间是10天。),再增加dataset_enlarge_ratio的值也无法提高速度了。然后我又尝试在DIV2K上训练,也调整了dataset_enlarge_ratio的值,分别设置为1、、10、20、100,发现设为20的时候,也到了最快的训练时间,预计为10天。可是DIV2K的数据集比DF2K少了3/4,为什么他们的训练时间是差不多的呢?是因为还有其他超参数或者硬件的原因导致的吗?

@zhengchen1999
Copy link
Owner

训练iteration=500K,和数据集无关(epoch根据数据集大小、iteration、dataset_enlarge_ratio、batch size计算得出)。

@DX3906ghh
Copy link
Author

好的,谢谢您的回答。

@DX3906ghh
Copy link
Author

作者您好,我现在是用四张V100跑的在DIV2K上的实验,请问除了data_enlarge_ratio这个超参数外,还有其他的超参数可以加快模型的训练速度吗?我现在调整了data_enlarge_ratio到50,训练时间已经无法再缩短了。

@zhengchen1999
Copy link
Owner

可以降低batch size、以及total iteration。按照经验,batch size和iteration降低一半,也能取得较好的性能。

@DX3906ghh
Copy link
Author

好的,感谢作者

@DX3906ghh
Copy link
Author

作者您好,请问您在论文中复现的SwinIR是用的哪个框架复现的呢,是BasicSR还是KAIR呢?

@zhengchen1999
Copy link
Owner

zhengchen1999 commented Dec 18, 2024

BasicSR

@DX3906ghh
Copy link
Author

我尝试过使用BasicSR进行复现,可是效果并不好,跟SwinIR论文中的效果还有些差距?请问您是怎么调参的呀

@zhengchen1999
Copy link
Owner

截屏2024-12-19 14 06 21 截屏2024-12-19 14 06 37 截屏2024-12-19 14 06 46

@DX3906ghh
Copy link
Author

谢谢作者,我去试试。

@DX3906ghh
Copy link
Author

作者您好,抱歉打扰了,请问您可以提供一下SwinIR的x3、x4的配置文件吗?不胜感激

@zhengchen1999
Copy link
Owner

YML.zip

@DX3906ghh
Copy link
Author

谢谢作者!

@DX3906ghh
Copy link
Author

再次叨扰您,请问您可以提供一下BasicSR上SwinIR测试的配置文件吗?

@zhengchen1999
Copy link
Owner

yml.zip

@DX3906ghh
Copy link
Author

感谢您!

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

3 participants