affeaa847d58416d5b9372cae521deb4550ce54d,torchreid/models/resnext.py,,init_pretrained_weights,#Any#Any#,190

Before Change


    model_dict.update(pretrain_dict)
    model.load_state_dict(model_dict)
    print("Initialized model with pretrained weights from {}".format(model_url))
    print("Imagenet weights unavailable")


def resnext50_32x4d(num_classes, loss, pretrained="imagenet", **kwargs):
    model = ResNeXt(

After Change


    Layers that don"t match with pretrained layers in name or size are kept unchanged.
    
    pretrain_dict = model_zoo.load_url(model_url)
    model_dict = model.state_dict()
    pretrain_dict = {k: v for k, v in pretrain_dict.items() if k in model_dict and model_dict[k].size() == v.size()}
    model_dict.update(pretrain_dict)
    model.load_state_dict(model_dict)
    print("Initialized model with pretrained weights from {}".format(model_url))


def resnext50_32x4d(num_classes, loss, pretrained="imagenet", **kwargs):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: KaiyangZhou/deep-person-reid
Commit Name: affeaa847d58416d5b9372cae521deb4550ce54d
Time: 2018-11-23
Author: k.zhou@qmul.ac.uk
File Name: torchreid/models/resnext.py
Class Name:
Method Name: init_pretrained_weights


Project Name: 1adrianb/face-alignment
Commit Name: f90efe38fb0b1019e5bdc06b8a325aefe44893ea
Time: 2018-12-19
Author: bulat.adrian@gmail.com
File Name: face_alignment/detection/sfd/sfd_detector.py
Class Name: SFDDetector
Method Name: __init__


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 205df55987d9c62c13738bebc5ffe18b738f1c50
Time: 2018-11-08
Author: k.zhou@qmul.ac.uk
File Name: train_imgreid_xent.py
Class Name:
Method Name: main