luogen1996 / RepAdapter

Official implementation of "Towards Efficient Visual Adaption via Structural Re-parameterization".
199 stars 24 forks source link

Why forward the model for 50 times #5

Open Zhaoyi-Yan opened 1 year ago

Zhaoyi-Yan commented 1 year ago

Hi, it's interesting here: https://github.com/luogen1996/RepAdapter/blob/9d9e4fc52d028421894d1d68c9bb551ae0415534/utils.py#L38-L39, any insights?

luogen1996 commented 1 year ago

This function is borrowed from here, which is a common practice in image classification. I guess that it is used to optimize the utilization of the GPU cache through multiple runs.