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 to do classification with SGD? #541

Closed
liguanbin opened this issue Jun 26, 2014 · 5 comments
Closed

how to do classification with SGD? #541

liguanbin opened this issue Jun 26, 2014 · 5 comments
Labels

Comments

@liguanbin
Copy link

hi, I am a newbie to caffe. I wanna do 2 class classification using caffe. I have lots of samples, say with 100 dimensions and each sample has a label, say 0 or 1. how can i get start to do this job? could anyone show me step by step including how to input my data into caffe? Thanks very much!

@teknosains
Copy link

have you got your own dataset ? once you're done with it...,lets caffe do the rest....

for example you can use Imagenet model

@liguanbin
Copy link
Author

my own dataset are some feature vectors (say, color histogram, HOG, SIFT...). may I make these data as input to caffe and do classification?

@wendlerc
Copy link

wendlerc commented Jul 7, 2014

@codetrash what do you mean by: let caffe do the rest? I tryed a binary classification task today, I took 1 class from the pascal2007 dataset (e.g. aeroplane), resized the images, calculated means for imgnet, generated the lvldb files (in my labeltext file it said 1 if aeroplane and 0 if not), then I changed the last fully connected layer of the imagenet protofile (i reduced the amount of outputs to 2) and called finetune. What I got was a loss of -nan. How one has to change the imgnet to make it available for differently sized classification tasks?

Best regards,
Chris

@wendlerc
Copy link

wendlerc commented Jul 8, 2014

#644 it is sufficient.

@shelhamer
Copy link
Member

@liguanbin optimization isn't magic. While stochastic gradient descent is effective for many problems, perhaps remarkably so, there are still hyperparameters like learning rate, mini-batch size, and so on to tune.

A lesson on how to learn classifiers and do optimization by SGD is outside the scope of the project. Consult a good text, like Bottou's guide, or online tutorial.

@shelhamer shelhamer changed the title how to do classification using caffe how to do classification with SGD? Jul 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants