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

Fine Tuning #21

Open
mzahran001 opened this issue Nov 8, 2016 · 2 comments
Open

Fine Tuning #21

mzahran001 opened this issue Nov 8, 2016 · 2 comments

Comments

@mzahran001
Copy link

How to fine tune your model?
I don't have sufficient data to retrain your model from scratch.I want to fine tune your model on my data which has only two classes ?

@fmassa
Copy link
Owner

fmassa commented Nov 8, 2016

Hi,

If you don't have enough data, I'd advise you to train an SVM using the last fc7 layer from the network.
There is a SVM trainer in here.

Using it will require you to convert your dataset to have labels in a format similar to Pascal VOC 2012 (or to write a dataset that has the same interface as DatasetPascal, which also includes computing bounding boxes.

@brisker
Copy link

brisker commented Dec 31, 2016

@fmassa Hi, after I trained a model from scratch, I found that the epoch seems not enough, so I reload the model and try to finetune it for a bit more epoches. But why the training loss seems like training from scratch?? I just use this code:
model=torch.load(...)
local parameters, gradParameters = model:getParameters()
...
The other codes are just the same as the code for training from scratch. Why this happens? I am really confused about this.

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

3 participants