how to set data layer when the output and label are both the same size images?

54 views
Skip to first unread message

CC ZHOU

unread,
Jun 24, 2016, 2:53:03 AM6/24/16
to Caffe Users
I need to compute the loss between output feature maps and labels. What I am planning now is:

name: "net"
layer {
  name: "data1"
  type: "Data"
  top:  "data1"
  top:  "label"
  include {
    phase: TRAIN
  }
  transform_param {
    mean_file: "D:\\deblurring\\mean_s.binaryproto"
    scale: 0.00390625
  } 
  data_param {
    source: "D:\\deblurring\\train_data_s_leveldb"
    batch_size: 2
    backend:  LEVELDB
  }
}
layer {
  name: "data2"
  type: "Data"
  top:  "data2"
  top:  "label2"
  include {
    phase: TRAIN
  }
  transform_param {
    mean_file: "D:\\deblurring\\mean_s.binaryproto"
    scale: 0.00390625
  } 
  data_param {
    source: "D:\\deblurring\\train_label_s_leveldb"
    batch_size: 2
    backend:  LEVELDB
  }
}
And loss layer:

layer {
  name: "loss"
  type: "EuclideanLoss"
  bottom: "conv12"
  bottom: "data2"
  top: "loss" 
}

Note conv12 is the final output feature maps.
Am I correct?

Anne

unread,
Jun 24, 2016, 3:54:42 AM6/24/16
to Caffe Users
I think you are right, just make sure that the size of the output of conv12 is the same size as data2 !

CC ZHOU

unread,
Jun 30, 2016, 2:05:00 AM6/30/16
to Caffe Users
Thanks for you confirmation.

在 2016年6月24日星期五 UTC+8下午3:54:42,Anne写道:
Reply all
Reply to author
Forward
0 new messages