peal.teachers.virelay_teacher.append_attributions¶
- peal.teachers.virelay_teacher.append_attributions(attribution_database_file, index, attributions, predictions, labels)[source]¶
Appends attributions to the attribution database file
- Parameters:
attribution_database_file (
h5py.File) – File created bycreate_attribution_database().index (
int) – Row at which the batch is written.attributions (
torch.Tensor) – Batch of attributions[B, *attribution_shape].predictions (
torch.Tensor) – Batch of prediction scores[B, num_classes].labels (
torch.Tensor) – Batch of labels[B].