peal.teachers.spray_teacher.create_input_database

peal.teachers.spray_teacher.create_input_database(dataset_file_path, samples_shape, number_of_samples)[source]

Create an HDF5 file with resizable data, label and filenames sets.

Parameters:
  • dataset_file_path (str) – Path of the HDF5 file to create (overwritten).

  • samples_shape (tuple of int) – Shape of one input sample, e.g. (C, H, W).

  • number_of_samples (int) – Initial length of the datasets.

Returns:

The open file handle.

Return type:

h5py.File

Raises:

ImportError – If the optional h5py dependency is not installed.