-
Notifications
You must be signed in to change notification settings - Fork 16
snippets
Youssef Kashef edited this page Mar 9, 2016
·
10 revisions
Short snippets or how-to's:
in matlab
:
addpath('~/src/caffe_sandbox/datasets/twoears/'); % for calling twoears2hdf5()
% format train set
fpath_src = './train/dataStoreUni.mat';
dir_dst = '~/data/twoears/' % directory must exist
twoears2hdf5(fpath_src, dir_dst);
% same for test set
fpath_src = './test/dataStoreUni.mat';;
dir_dst = '~/data/twoears/' % directory must exist, can be same location as test set
twoears2hdf5(fpath_src, dir_dst);
Caffe has(had) a cap on the size of a single HDF5 file. The workaround is to split the HDF5 into multiple smaller HDF5 files and list them in the .txt file provided to the HDF5DataLayer.
in python
:
from iow.to_hdf5 import split_hdf5
fpath_src = '~/data/data_train.h5'
paths = split_hdf5(fpath_src, '~/data/split/')
# ...create a txt file in which each line contains the absolute path of each new smaller HDF5