You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My problem is it seems caffe does not allow float labels like 2.0, when I use float labels while reading , for example the test.txt file caffe only
recognizes "a total of 1 images", which is wrong.
But when I for example change the 2.0 to 2 in the file and the following lines same, caffe now gives "a total of 2 images" implying that the float labels are responsible for the problem.
Can anyone help me here, to solve this problem, I definitely need to use float labels for regression, so does anyone know about a work around or solution for this? Thanks in advance.
The text was updated successfully, but these errors were encountered:
In caffe.proto you can see that label is defined as int32, so you can't use float labels directly.
An alternative method is to use two data layer, you can read images from the first data layer and read labels from the other one.
This is my train data layer.
name: "MyCaffeNet"
layer {
name: "data"
type: "ImageData"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
mirror: true
crop_size: 227
mean_file: "data/ilsvrc12/imagenet_mean.binaryproto"
}
image_data_param {
source: "data/finetune_dev/train.txt"
batch_size: 50
new_height: 256
new_width: 256
}
}
Can you please elaborately, explain how would I go on about writing 2 layers from this one. For example, what would be the type for the new layer, and how would the existing imagedata layer be modified. Please, I would be very much obliged.
Hi,
I am doing regression using caffe, and my test.txt ans train.txt files are like this:
/home/foo/caffe/data/finetune/flickr/3860781056.jpg 2.0
/home/foo/caffe/data/finetune/flickr/4559004485.jpg 3.6
/home/foo/caffe/data/finetune/flickr/3208038920.jpg 3.2
/home/foo/caffe/data/finetune/flickr/6170430622.jpg 4.0
/home/foo/caffe/data/finetune/flickr/7508671542.jpg 2.7272
My problem is it seems caffe does not allow float labels like 2.0, when I use float labels while reading , for example the test.txt file caffe only
recognizes "a total of 1 images", which is wrong.
But when I for example change the 2.0 to 2 in the file and the following lines same, caffe now gives "a total of 2 images" implying that the float labels are responsible for the problem.
Can anyone help me here, to solve this problem, I definitely need to use float labels for regression, so does anyone know about a work around or solution for this? Thanks in advance.
The text was updated successfully, but these errors were encountered: