Vision: Has these models already implemented support for group normalization?

Created on 2 Jul 2019  路  6Comments  路  Source: pytorch/vision

Most helpful comment

Solved:

class GroupNorm32(torch.nn.GroupNorm):
    def __init__(self, num_channels, num_groups=32, **kargs):
        super().__init__(num_groups, num_channels, **kargs)

All 6 comments

Yes, the model support Group Norm, but there are no pre-trained models for those.

Group Norm generally doesn't improve classification accuracy, but is better when training on small-batch regime like for object detection

OK, thanks for your reply.
Group Norm is suitable for me, I am looking for the pretrained models using it... :smiley: .

We currently have no plans to add pre-trained models with group norm for classification, at least for the next release of torchvision.

@fmassa Could you tell me how to instantiate a model with GroupNorm? The following doesn't work:

torchvision.models.resnet50(norm_layer=torch.nn.GroupNorm)

Thanks.

Solved:

class GroupNorm32(torch.nn.GroupNorm):
    def __init__(self, num_channels, num_groups=32, **kargs):
        super().__init__(num_groups, num_channels, **kargs)

I have found the repo which has some models with groupnorm:

https://github.com/ppwwyyxx/GroupNorm-reproduce

However, it does not provide the pretrained models...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fmassa picture fmassa  路  45Comments

timonbimon picture timonbimon  路  28Comments

lpuglia picture lpuglia  路  44Comments

ppwwyyxx picture ppwwyyxx  路  33Comments

ShahriarSS picture ShahriarSS  路  30Comments