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

How do you resume training? #38

Open
1yian opened this issue Jul 20, 2019 · 4 comments
Open

How do you resume training? #38

1yian opened this issue Jul 20, 2019 · 4 comments
Labels
enhancement New feature or request training Training Related Questions

Comments

@1yian
Copy link

1yian commented Jul 20, 2019

What specific flags should I pass into train.py in order to resume my training checkpoint? I'm not sure if --transfer none, fine_tune, freeze, darknet fit the criteria to resume as they all involve freezing or getting rid of some parts of the weights.

@Hugh0120
Copy link

Hugh0120 commented Aug 1, 2019

I simply replaced that part of code with
model.load_weights("/path/to/your/previous/ckpt")
to resume training

@ilyes-hamrouni
Copy link

I simply replaced that part of code with
model.load_weights("/path/to/your/previous/ckpt")
to resume training

How can do it for training from scratch there is no model.load in the no transfer.

@studjon
Copy link

studjon commented Dec 16, 2019

I simply replaced that part of code with
model.load_weights("/path/to/your/previous/ckpt")
to resume training

How can do it for training from scratch there is no model.load in the no transfer.

You can simply cut the line "model.load_weights(FLAGS.weights)" and paste it before the "if transfer != none". It will then load the weights you specified. This weight flag then should contain the path to your previously trained weights, something like "./dirPath/yolov3_train_100.tf". Hope this is still of use, if not, maybe for future users having problems with this part.

@zzh8829 zzh8829 added training Training Related Questions enhancement New feature or request labels Dec 20, 2019
@TheClassyPenguin
Copy link

TheClassyPenguin commented Jan 7, 2020

Have any of you successfully resumed fine-tuning training of darknet with custom classes?

I tried the method mentioned above but I got:

ValueError: Shapes (18,) and (255,) are incompatible

This is the same error I'd get if I didn't specify the --weight_classes parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request training Training Related Questions
Projects
None yet
Development

No branches or pull requests

6 participants