train_val.prototxt - Using data_param and image_data_param together

288 views
Skip to first unread message

Sid

unread,
Dec 31, 2015, 9:33:48 PM12/31/15
to Caffe Users
My train_val.prototxt:

layer {
  name
: "data"
  type
: "Data"
  top
: "data"
  top
: "label"
  include
{
    phase
: TRAIN
 
}
  transform_param
{
    mirror
: true
    crop_size
: 224
    mean_file
: "data/mean.binaryproto"
 
}
  data_param
{
    source
: "data/train_lmdb"
    batch_size
: 32
    backend
: LMDB
 
}
  image_data_param
{
    new_height
: 256
    new_width
: 256
 
}
}

My Network is running but I want to make sure that this layer definition will work properly. How can i ensure that the images being fed to the network during training will get resized to 256x256 and then cropped to 224? The reason I can't just use image_data_param is because I can't use the backend keyword within image_data_param (error is thrown)

Any help would be greatly appreciated.

Thanks!

Sid

unread,
Jan 2, 2016, 7:02:25 PM1/2/16
to Caffe Users
I looked at my solver log and there is no output from image_data_layer.cpp. line 80 of image_data_layer.cpp indicates that there should be an output to the log but in my case, this did not occur. So, it looks like my image_data_param configuration is being ignored. The only data layer log output returned was the following:

I1231 21:35:02.604929 25749 data_layer.cpp:44] output data size: 26,3,224,224


So it looks like the cropping is happening but the initial resize that I want is not. Does anyone know of a way to first resize and then crop?

Reply all
Reply to author
Forward
0 new messages