Testing phase for MemoryData layer

26 views
Skip to first unread message

Enes Deumić

unread,
May 25, 2016, 5:25:21 PM5/25/16
to Caffe Users
I've been successfully using MemoryData layer for training neural network by manually feeding the data to network from memory using Net.set_input_arrays from python. However I have problem with testing phase, in solver.prototxt test interval is removed because it returns an error, since with memory layer you do your own fillings of data.
I could do the forward pass with validation data through the train network, but then dropout is not disabled which should be turned off during validation phase and I'd like to have some other layers like prob and accuracy which are only present in validation stage. Since no test is specified in solver.prototxt, solver.test_nets is not available.
Here is the data layer:
 
layer {
  name: "data"
  type: "MemoryData"
  top: "data"
  top: "label"
  memory_data_param {
    batch_size: 256
    channels: 3
    height: 227
    width: 227
  }
  include {
    phase: TRAIN
  }
}
layer {
  name: "data"
  type: "MemoryData"
  top: "data"
  top: "label"
  memory_data_param {
    batch_size: 32
    channels: 3
    height: 227
    width: 227
  }
  include {
    phase: TEST
  }
}

Perhaps a solution could be to manually create one more network, with caffe.TEST flag and have a copy of the weights. I'm not sure how that would be done.

So what is the way to use network in TEST phase?
Reply all
Reply to author
Forward
0 new messages