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

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

Open
math-yyj opened this issue Jan 16, 2019 · 6 comments
Open

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

math-yyj opened this issue Jan 16, 2019 · 6 comments

Comments

@math-yyj
Copy link

Many thanks !

@chenjun2hao
Copy link

@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
Copy link
Owner

yxlijun commented Jan 16, 2019

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

@YIYIZH
Copy link

YIYIZH commented May 15, 2019

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
Copy link

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
Copy link

pacchomp commented Jul 3, 2023

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
Copy link

chenjun2hao commented Jul 3, 2023 via email

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

No branches or pull requests

6 participants