-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Multi label regression in Caffe #1765
Comments
I think you should use also a EUCLIDEAN_LOSS instead of ACCURACY for the accuracy layer according to this: #512 |
The problem is loss layer with EUCLIDEAN_LOSS can output 1 value. It cannot output 30 outputs. Lets say INNER_PRODUCT layer gives 30 output, the loss layer computes sum of all 30 outputs to produce loss. Thats not i want. I want to compute 30 losses for 30 outputs . |
The input blob 'label' is only one-dimensional, it needs to be a 30 dimensional as well |
The input data hd5 is already 30 dimensional. i read somewhere only hd5 can handle multiple input labels. i remove the accuracy layer from above, i connect the IP to euclidean loss layer. It runs but i am not entirely convinced. Am i doing it right? i see loss value but not converging hmmm :( I am still not using test data just training.
|
Did you resolve your issue? |
Thanks @pannous |
Please ask modeling questions on the caffe-users mailing list. |
i fixed the labels and data dimensions and there is another problem. The network is predicting same output in the fc7 layer, no matter what the input is I am continuing this thread here: https://groups.google.com/forum/#!topic/caffe-users/o4cpDNylo3Q |
@olddocks how did you fix the labels and data dimensions? could you please share the code? |
@nayef i fixed the issue by adding bias=1 to the layers. Adding another ip layer also helped. |
So no change was needed in data dimensions?
|
Yes i changed the dimensions needed. It worked 👍 |
What change did you make in dimensions?
|
@olddocks I'd also be interested to have a more thorough explanation on how you fixed the issue. Thanks! |
Hi @olddocks , i am dealing with a similar regression problem. However, my .csv file contains image filename and 3 real values labels. How can I create hdf5 input file? Also, if I use some popular network such as AlexNet, VGG,... to train a regression problem, what should be the appropriate changes in prototxt files? |
Hi, @olddocks I am doing the facial keypoints detection on the dataset: http://mmlab.ie.cuhk.edu.hk/archive/CNN_FacePoint.htm. I used similary network as you, but the output for different image is always the same. Could you give me some suggestions about this problem? num_cols = 1 dirname ='/home/deep-learning/caffe/matlab/facial_point_estimation/dataset/face/train/'
with h5py.File(os.getcwd()+ '/test_data.h5', 'w') as f: with open(os.getcwd() + '/test_data_list.txt', 'w') as f: |
i am extracting 30 facial keypoints (x,y) from an input image as per kaggle facialkeypoints competition.
How do i setup caffe to run a regression and produce 30 dimensional output??.
How do i setup caffe accordingly?. I am using EUCLIDEAN_LOSS (sum of squares) to get the regressed output. Here is a simple logistic regressor model using caffe but it is not working. Looks accuracy layer cannot handle multi-label output.
Here is the layer file:
I am have seen this topic but really cant get a grasp of it. I see that stable version of caffe can handle only 1 or 2 outputs.
The text was updated successfully, but these errors were encountered: