HDF5 Format

97 views
Skip to first unread message

Nat Mcaleese

unread,
Apr 5, 2015, 7:31:18 AM4/5/15
to caffe...@googlegroups.com
Hey,

I've been trying to use the hdf5 format with caffe.
Just to check, if I have N images which are in colour and WxH pixels in size, and each image has a 1xL label, I should follow the following steps:

Create a numpy array which is (N,W,H,3) in shape.
Instantiate each of the N positions with an image.

Create a numpy array which is (N,L) in shape.
Instantiate each of the N positions with L labels.

Save these arrays in a .h5 file as 'data' and 'label' respectively.

Train away.

Could someone tell me if there is an issue with this process. The documentation is a 'touch' unclear.

Thanks!

Nat Mcaleese

unread,
Apr 5, 2015, 8:30:38 AM4/5/15
to caffe...@googlegroups.com
Ah, in fact the shape should be 
(N,3,H,W)

Sorry if there's an edit button I missed.
Reply all
Reply to author
Forward
0 new messages