我正在将文件写入hdf5.file,如下所示:
image = np.zeros( (split, 1, IMAGE_SIZE, IMAGE_SIZE), dtype=np.float )
img = img.astype(np.float)
image[counter] = img[np.newaxis, :, :]
....
H.create_dataset( 'data', data=image)
我收到了输出:
I0828 09:25:57.495980 21298 hdf5_data_layer.cpp:79] Loading list of HDF5 filenames from: train_h5_list.txt
I0828 09:25:57.509590 21298 hdf5_data_layer.cpp:93] Number of HDF5 files: 8259
I0828 09:25:57.566036 21296 hdf5_data_layer.cpp:79] Loading list of HDF5 filenames from: train_h5_list.txt
I0828 09:25:57.879372 21296 hdf5_data_layer.cpp:93] Number of HDF5 files: 8259
I0828 09:25:58.406316 21297 hdf5_data_layer.cpp:79] Loading list of HDF5 filenames from: train_h5_list.txt
I0828 09:25:58.418432 21297 hdf5_data_layer.cpp:93] Number of HDF5 files: 8259
I0828 09:26:02.211232 21262 solver.cpp:273] Solving train
I0828 09:26:02.211280 21262 solver.cpp:274] Learning Rate Policy: fixed
I0828 09:26:02.214079 21262 solver.cpp:331] Iteration 0, Testing net (#0)
I0828 09:26:18.361723 21262 hdf5.cpp:35] Datatype class: H5T_INTEGER
修改的
使用as.type('f4')
时,它看起来像这样:
h5ls train2102.h5
data Dataset {100, 1, 256, 256}
volume Dataset {100, 128, 128, 128}
使用-v看起来像这样:
data Dataset {100/100, 1/1, 256/256, 256/256}
Location: 1:800
Links: 1
Storage: 26214400 logical bytes, 26214400 allocated bytes, 100.00% utilization
Type: native float
volume Dataset {100/100, 128/128, 128/128, 128/128}
Location: 1:1400
Links: 1
Storage: 838860800 logical bytes, 838860800 allocated bytes, 100.00% utilization
Type: native float
现在看起来好多了!