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

The problem of the number of categories in pre-training? #89

Open
Yuyiba opened this issue Oct 19, 2020 · 1 comment
Open

The problem of the number of categories in pre-training? #89

Yuyiba opened this issue Oct 19, 2020 · 1 comment

Comments

@Yuyiba
Copy link

Yuyiba commented Oct 19, 2020

Hi,This is perhaps a very simple question, but I don’t understand
Using my data set, there are 5 categories,I wonder if we need change 19 to 5?
thanks!
new_params = model.state_dict().copy()
for i in saved_state_dict:
# Scale.layer5.conv2d_list.3.weight
i_parts = i.split('.')
# print i_parts
if not args.num_classes == 19 or not i_parts[1] == 'layer5':
new_params['.'.join(i_parts[1:])] = saved_state_dict[i]
# print i_parts
model.load_state_dict(new_params)

@lychrel
Copy link

lychrel commented Dec 30, 2020

which file is that in?

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

2 participants