DetectionEngine.fit

DetectionEngine.fit(verbose=False)

Train every model in the specification, in turn, against the same data.

Anchors are fitted first for any model that does not declare them, because the targets cannot be encoded without them. A model naming weights adopts the architecture, the class names and the anchors from the file: weights mean nothing without the anchors they were trained with, so a specification naming both is refused rather than warned about.

Parameters

Name Type Description Default
verbose bool Print each model’s name and per-epoch numbers as they arrive. The learning rate is printed with enough digits to see a schedule moving - at four decimal places a cosine decaying to 1e-8 read learning_rate=0.0000 from epoch 90 and a scheduled run looked identical to an unscheduled one. False

Returns

Name Type Description
dict[str, History] One History per model, by name, and the same objects are kept on the engine
dict[str, History] so evaluate, predict and export_weights can be called afterwards.

Raises

Name Type Description
EngineError If a split a model needs is missing or carries no annotations.