2cb10319425bf54108cc5fe7bcb1b4d13271c9cd,train_vidreid_xent_htri.py,,main,#,37

Before Change



    if args.load_weights and check_isfile(args.load_weights):
        // load pretrained weights but ignore layers that don"t match in size
        checkpoint = torch.load(args.load_weights)
        pretrain_dict = checkpoint["state_dict"]
        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("Loaded pretrained weights from "{}"".format(args.load_weights))

    if args.resume and check_isfile(args.resume):
        checkpoint = torch.load(args.resume)

After Change


    scheduler = lr_scheduler.MultiStepLR(optimizer, milestones=args.stepsize, gamma=args.gamma)

    if args.load_weights and check_isfile(args.load_weights):
        load_pretrained_weights(model, args.load_weights)

    if args.resume and check_isfile(args.resume):
        checkpoint = torch.load(args.resume)
        model.load_state_dict(checkpoint["state_dict"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 14

Instances


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 2cb10319425bf54108cc5fe7bcb1b4d13271c9cd
Time: 2019-02-01
Author: k.zhou@qmul.ac.uk
File Name: train_vidreid_xent_htri.py
Class Name:
Method Name: main


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 2cb10319425bf54108cc5fe7bcb1b4d13271c9cd
Time: 2019-02-01
Author: k.zhou@qmul.ac.uk
File Name: train_imgreid_xent.py
Class Name:
Method Name: main


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 2cb10319425bf54108cc5fe7bcb1b4d13271c9cd
Time: 2019-02-01
Author: k.zhou@qmul.ac.uk
File Name: train_vidreid_xent.py
Class Name:
Method Name: main


Project Name: KaiyangZhou/deep-person-reid
Commit Name: 2cb10319425bf54108cc5fe7bcb1b4d13271c9cd
Time: 2019-02-01
Author: k.zhou@qmul.ac.uk
File Name: train_imgreid_xent_htri.py
Class Name:
Method Name: main