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

A question about pre-train model? #40

Open
Ouya-Bytes opened this issue Mar 4, 2017 · 15 comments
Open

A question about pre-train model? #40

Ouya-Bytes opened this issue Mar 4, 2017 · 15 comments

Comments

@Ouya-Bytes
Copy link

Dear davheld:
I have a question about how do you get the pretrain model, can you give some detials? Question as follows:
(1) Which dataset ( such:ILSVRC2014_DET or ILSVRC2014_CLS) to pretrain the convolutional layer?
(2) If I only use the dataset of ALOV300+ and 2014_DET to train the net get regression value , or don't do the step of pretrain convolution layer, will decresed the tracking performance?
(3) When you train the siamese net, the two network branch will shared the layer params? or has independence parameters?
Looking forward to your reply, best wish!

@davheld
Copy link
Owner

davheld commented Mar 5, 2017

  1. I use the pre-trained CaffeNet architecture, which is available from Caffe:
    http://caffe.berkeleyvision.org/model_zoo.html

  2. I think it probably will - if you do this then I recommend using a much smaller architecture.

  3. As mentioned above, I do not pre-train the convolutional layers myself but I take the layers pre-trained from Caffe. The two sets of convolutional layers have identical weights.

@Ouya-Bytes
Copy link
Author

@davheld I according to your code(tracker.prototxt and solver.prototxt ,iteration 500000) and use the train.cpp to train the network use dataset(2014_DET and ALOV300+), the train loss value is not convergent, and oscillation between on 20 ~ 50 finally.so that have a very pool tracking performance. Can you give me some advise? Thks

@davheld
Copy link
Owner

davheld commented Mar 5, 2017

It sounds like you are overfitting. Just to be sure - I don't train the conv layers at all, those are pre-trained using CaffeNet.

@Ouya-Bytes
Copy link
Author

yet, i only use your code and prototxt( run the train.cpp, keep params of solver.prototxt and tracker.prototxt) to re-train the network, i don't change anymore. the convolutional layer is from CaffeNet, and lr_mult is set 0 no change.

@davheld
Copy link
Owner

davheld commented Mar 5, 2017

How do you create the pre-trained network?

@Ouya-Bytes
Copy link
Author

the pretrian param from your offer address http://cs.stanford.edu/people/davheld/public/GOTURN/weights_init/tracker_init.caffemodel, i dont change the prototxt, i only want to run train.cpp code to get tracker_iter_500000.caffemodel, then can test the tracker

@davheld
Copy link
Owner

davheld commented Mar 5, 2017

That's odd, not sure.

@Jiangfeng-Xiong
Copy link

I have the same problem, changing val_ratio from 0.2 to 0 in "loader/loader_alov.cpp" may help, but still , model trained by myself doesn't perform as good as pre-train model.

@Ouya-Bytes
Copy link
Author

not convergent? oscillation?

@davheld
Copy link
Owner

davheld commented Mar 6, 2017

The oscillation is normal and simply occurs because the training evaluation is occurring on mini-batches which are randomly sampled at each iteration. However, the numbers that you listed seem lower than what I remember so I believe that you are overfitting, although I am not sure why.

@Jiangfeng-Xiong
Copy link

train loss is like this train loss, range from 20 to 90 @OuYag

@davheld
Copy link
Owner

davheld commented Mar 6, 2017

Try reducing the learning rate? The oscillations in that graph look fairly large. Although if you are using the default learning rate then this is unusual that you should need to change it. Also, make sure that all convolutional layers are fixed (e.g. in both streams of the network).

@ujsyehao
Copy link

ujsyehao commented Mar 15, 2017

@OuYag your words"lr_mult is set 0 no change." I don't think it is right, lr_mult set to 0 means no learning rate.
Caffe says that we will set the weight learning rate to be the same as the learning rate given by the solver during runtime

@freescar
Copy link

freescar commented Nov 1, 2017

@Jiangfeng-Xiong @OuYag do you solve the issue? I have the same problem, the test loss value is between 10 and 20. I guess it is overfitting, however changing lr or batchsize cannot reduce losses

@wendianwei
Copy link

Hi, I want to know how to evaluate your performance?

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