sportslabkit.vector_model.base#

Overview#

Classes#

BaseVectorModel

Abstract Base Class for handling vector-based models.

Classes#

class sportslabkit.vector_model.base.BaseVectorModel(input_vector_size: int | None = None, output_vector_size: int | None = None)[source]#

Bases: abc.ABC

Abstract Base Class for handling vector-based models.

This class encapsulates model loading, input/output validation, and forward pass operations.

Overview

Methods#

forward(inputs, **kwargs)

abc Define the forward pass of the model. Must be overridden by subclasses.

load(path)

Load the model from disk.

Members

abstract forward(inputs: sportslabkit.types.Vector, **kwargs: Any) sportslabkit.types.Vector[source]#

Define the forward pass of the model. Must be overridden by subclasses.

Parameters:
  • inputs (Vector) – The input data.

  • **kwargs (Any) – Additional arguments to be passed to the forward method.

Returns:

The output data.

Return type:

Vector

load(path: str) None[source]#

Load the model from disk.

Parameters:

path (str) – The path to the model file.