peal.teachers.spray_teacher.create_attribution_database

peal.teachers.spray_teacher.create_attribution_database(attribution_database_file_path, attribution_shape, number_of_classes, number_of_samples)[source]

Create an HDF5 attribution database in the ViReLay layout.

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

  • attribution_shape (tuple of int) – Shape of one attribution (e.g. (C, H, W) for a layer).

  • number_of_classes (int) – Width of the prediction dataset.

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

Returns:

Open file with attribution, prediction, label and dataset_split datasets.

Return type:

h5py.File

Raises:

ImportError – If the optional h5py dependency is not installed.