summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Yeager <lyeager@nvidia.com>2015-08-26 01:58:45 (GMT)
committerLuke Yeager <luke.yeager@gmail.com>2015-09-24 19:35:48 (GMT)
commitebc9963fea7b72f397c446a10a9aeab576979566 (patch)
treefe2bb5736f58f43fee452443c645047ccca588c8
parent84e390c5a16347c7369f6c92cb62526e42ce73ac (diff)
downloadcaffeonacl-ebc9963fea7b72f397c446a10a9aeab576979566.zip
caffeonacl-ebc9963fea7b72f397c446a10a9aeab576979566.tar.gz
caffeonacl-ebc9963fea7b72f397c446a10a9aeab576979566.tar.bz2
Modify HDF5DataLayerTest to test H5T_INTEGER data
-rw-r--r--src/caffe/test/test_data/generate_sample_data.py14
-rw-r--r--src/caffe/test/test_data/sample_data_2_gzip.h5bin15446 -> 15446 bytes
2 files changed, 8 insertions, 6 deletions
diff --git a/src/caffe/test/test_data/generate_sample_data.py b/src/caffe/test/test_data/generate_sample_data.py
index 3703b41..8349dbb 100644
--- a/src/caffe/test/test_data/generate_sample_data.py
+++ b/src/caffe/test/test_data/generate_sample_data.py
@@ -36,23 +36,25 @@ with h5py.File(script_dir + '/sample_data.h5', 'w') as f:
f['label'] = label
f['label2'] = label2
-with h5py.File(script_dir + '/sample_data_2_gzip.h5', 'w') as f:
+with h5py.File(script_dir + '/sample_data_uint8_gzip.h5', 'w') as f:
f.create_dataset(
'data', data=data + total_size,
compression='gzip', compression_opts=1
)
f.create_dataset(
'label', data=label,
- compression='gzip', compression_opts=1
+ compression='gzip', compression_opts=1,
+ dtype='uint8',
)
f.create_dataset(
'label2', data=label2,
- compression='gzip', compression_opts=1
+ compression='gzip', compression_opts=1,
+ dtype='uint8',
)
with open(script_dir + '/sample_data_list.txt', 'w') as f:
- f.write(script_dir + '/sample_data.h5\n')
- f.write(script_dir + '/sample_data_2_gzip.h5\n')
+ f.write('src/caffe/test/test_data/sample_data.h5\n')
+ f.write('src/caffe/test/test_data/sample_uint8_gzip.h5\n')
# Generate GradientBasedSolver solver_data.h5
@@ -76,4 +78,4 @@ with h5py.File(script_dir + '/solver_data.h5', 'w') as f:
f['targets'] = targets
with open(script_dir + '/solver_data_list.txt', 'w') as f:
- f.write(script_dir + '/solver_data.h5\n')
+ f.write('src/caffe/test/test_data/solver_data.h5\n')
diff --git a/src/caffe/test/test_data/sample_data_2_gzip.h5 b/src/caffe/test/test_data/sample_data_2_gzip.h5
index a138e03..0cb9ef9 100644
--- a/src/caffe/test/test_data/sample_data_2_gzip.h5
+++ b/src/caffe/test/test_data/sample_data_2_gzip.h5
Binary files differ