fix a bug in convert_training_data_to_hdf5
#1167
Merged
convert_training_data_to_hdf5
#1167