Skip to main content

Module classifier

Module classifier 

Source
Expand description

Phase 4 / V4 — frozen embedding + compact linear classifier head.

Uses the existing CPU-reference embedding (or any VisualModel embed) and a caller-supplied weight matrix for a closed vocabulary. No Python, no deep training loop — head can be filled offline or by simple accumulators.

Structs§

LinearHead
Compact linear head: logits[c] = bias[c] + sum_i embed[i] * weight[c * dim + i].
LinearProbeVision
Wraps a base visual model: takes its embedding, runs linear head, emits 0–1 detection.

Functions§

fit_two_class_centroids
Train a 2-class head by averaging embeddings of two example batches (centroid).