Access output of a Caffe Slice Layer
I have a caffe model containing a Slice Layer. The input dimension is (1, 96, 128, 128)
layer {
name: "63_64"
type: "Slice"
bottom: "62"
top: "63"
top: "64"
slice_param {
slice_point: 48
axis: 1
}
}
and I want to get both resulting arrays (63 & 64). So what I thought I had to do was the following:
model = cv2.dnn.readNetFromCaffe("model.prototxt", "model.caffemodel")
model.setInput(blob)
r = model.forward(["63_64"])
Which should have given me two matrices with a dimension of (1, 48, 128, 128)
, but I only got the first one.
How do I access the second matrix
Remove
square brackets
.The squere brackets are still there because originally I wanted to receive multiple layers. Removing them does not make any difference except that the output is one numpy array instead of a python list with one numpy array