Matrix predictions - HDF5 label creation

71 views
Skip to first unread message

sri

unread,
Jun 24, 2015, 4:59:40 PM6/24/15
to caffe...@googlegroups.com
Hi,

Similar to semantic segmentation, I'm training a network to assign each pixel to a class. It seems from here and here that this type of prediction and loss can be handled by Softmax-with-loss layer. My question is in preparing the matrix labels for this case. I'm planning to use HDF5 file and corresponding data layer for the images and label, following the example in caffe. If I have N labels, each is a matrix of shape H x W, do I create a numpy array of shape N x (H*W) and dump it ?

This piece of code should be able to create appropriate labels right ?
for i = 1:N:
    labels = np.vstack(labels,label_mat[i].reshape(-1)) 

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages