xnn.common.finetune.heads.label_head#
- xnn.common.finetune.heads.label_head(structures, head)[source]#
Tag structure dicts (or a dataset of them) with a readout head.
Sets
s["head"] = headon every structure, whichstructure_to_graph()turns into the graph’sheadfield. AnAtomicDatasethas its graph cache cleared so the label reaches graphs already built.- Parameters:
structures (iterable of dict or AtomicDataset) – The structures.
head (int) – The head index.
- Return type:
The same object, labelled in place.