yxlijun / DSFD.pytorch

DSFD implement with pytorch
167 stars 58 forks source link

Is there any results done by using Resnet? Many thanks ! #3

Open math-yyj opened 5 years ago

math-yyj commented 5 years ago

Many thanks !

chenjun2hao commented 5 years ago

@mathyyj have you meet this problem when use the pretrained model. thanks RuntimeError: unexpected EOF, expected 167945 more bytes. The file might be corrupted.

yxlijun commented 5 years ago

I am training by using resnet ,but the result is not good ,if the result become better,I will upload resnet model

YIYIZH commented 5 years ago

Hello, is there any result of training by resnet? I am trying to train with a pretrained Resnet152 model import from torchvision, but the weights are not matched. (Since the resnet152 has a final fc layer with 1000 classes), any solution for this? Thanks.

ChauncyFr commented 5 years ago

Hello, is there any result of training by resnet? I am trying to train with a pretrained Resnet152 model import from torchvision, but the weights are not matched. (Since the resnet152 has a final fc layer with 1000 classes), any solution for this? Thanks.

You can try to modify the code here in the train.py file as follows:

        if args.model == 'vgg':
            net.vgg.load_state_dict(base_weights)
        else:
            pretrained_dict = base_weights
            model_dict = net.resnet.state_dict()
            pretrained_dict = {k:v for k,v in pretrained_dict.items() if k in model_dict}
            model_dict.update(pretrained_dict)
            print(model_dict)
            net.resnet.load_state_dict(model_dict)
pacchomp commented 1 year ago

Hello, is there any result of training by resnet? I am trying to train with a pretrained Resnet152 model import from torchvision, but the weights are not matched. (Since the resnet152 has a final fc layer with 1000 classes), any solution for this? Thanks.

hello,have you fixed the problem and do you get the result by training res152?

chenjun2hao commented 1 year ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。