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"] = head on every structure, which structure_to_graph() turns into the graph’s head field. An AtomicDataset has its graph cache cleared so the label reaches graphs already built.

Parameters:
Return type:

The same object, labelled in place.