Skip to main content

train_relations

Function train_relations 

Source
pub fn train_relations(
    spec: &VocabularySpace,
    examples: &[TaggerExample],
    cfg: &TrainConfig,
    tagger_dir: &Path,
    epochs: usize,
) -> Result<(VarMap, RelReport), String>
Expand description

Train Head C on top of a (frozen) tuned encoder. The encoder is reloaded read-only from the step-2 checkpoint: Head A already learned the span representations, so Head C only needs to learn the pair geometry, which keeps this stage cheap and stable.