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

Support RepGhostNetV2 conv s/m/l, based on MobileNetV4, without weights though #2205

Closed
wants to merge 1 commit into from

Conversation

ChengpengChen
Copy link

@ChengpengChen ChengpengChen commented Jun 14, 2024

Build RepGhostNetV2 based on MobileNetV4.

Our RepGhostNetV2 differs to MobileNetV4 only in the shortcut connections.

As an alternative efficient backbone to MobileNetV4, RepGhostNetV2 has exactly the same parameters and FLOPs to MobileNetV4, and also achieves similar performance.

refer to: https://github.com/ChengpengChen/RepGhostNetV2

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@rwightman
Copy link
Collaborator

rwightman commented Jun 14, 2024

@ChengpengChen thanks, once I'm done/satisified with the remaining mobilenetv4 model trainings I'll see how these fair with comparable hparams.

FYI, if there is any reparameterization scheme to be deployed here, a fuse, reparameterize method can be added to the UniversalInvertedResidual block, the --reparam arg for val/benchmark/export scripts will recursively call any of those methods if they exist on model child modules.

def reparameterize_model(model: torch.nn.Module, inplace=False) -> torch.nn.Module:

@ChengpengChen
Copy link
Author

@ChengpengChen thanks, once I'm done/satisified with the remaining mobilenetv4 model trainings I'll see how these fair with comparable hparams.

FYI, if there is any reparameterization scheme to be deployed here, a fuse, reparameterize method can be added to the UniversalInvertedResidual block, the --reparam arg for val/benchmark/export scripts will recursively call any of those methods if they exist on model child modules.

def reparameterize_model(model: torch.nn.Module, inplace=False) -> torch.nn.Module:

Thanks!

Would be great if you help to compare these two networks.

Btw, RepGhostNetV2 is actually NOT a re-parameterized backbone like its V1 version, but built with the RepGhost bottlenecks (that's why it is called V2 ;)
It is a MobileNetV4-like backbone, and they only differ in the shortcut connections. So, we may not have to add these fuse or reparameterize methods.

@rwightman
Copy link
Collaborator

@ChengpengChen started training a large @ 384x384 with exact hparams of the mnv4 conv-large I trained.

@ChengpengChen
Copy link
Author

@ChengpengChen started training a large @ 384x384 with exact hparams of the mnv4 conv-large I trained.

Hi, @rwightman
Is there any update on the training results?

@rwightman
Copy link
Collaborator

@ChengpengChen got sidelined by a bit of time off the other week... so I did finish training the large, but it's ~ .5% or so behind the mnv4 equivalent, so around 82.5% instead of 82.95. There didn't appear to be any improved throughput or win to warrant the accuracy tradeoff

@ChengpengChen
Copy link
Author

@ChengpengChen got sidelined by a bit of time off the other week... so I did finish training the large, but it's ~ .5% or so behind the mnv4 equivalent, so around 82.5% instead of 82.95. There didn't appear to be any improved throughput or win to warrant the accuracy tradeoff

Sure, thanks for the info!

@rwightman rwightman closed this Jul 26, 2024
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

Successfully merging this pull request may close these issues.

3 participants