nvalchemi.training.distillation.default_distillation_fn#
- nvalchemi.training.distillation.default_distillation_fn(models, batch)[source]#
Run the student forward pass and prefix output keys with
predicted_.The teacher is never called here: teacher knowledge reaches the loss as
teacher_*batch fields, either written offline bylabel_dataset()or attached to the batch byDistillationStrategy.attach_teacher_labels().- Parameters:
models (Mapping[str, BaseModelMixin]) – Named models of the strategy; only
"student"is read.batch (Batch) – Input batch of atomic graphs.
- Returns:
Predictions keyed by
predicted_<output_name>withNoneoutputs omitted.- Return type:
dict[str, torch.Tensor]