Skip to content

defines

Classes

QuantizationParams

Quantization parameters

Attributes:

  • enabled (bool) –

    Enable quantization

  • qat (bool) –

    Enable quantization aware training (QAT)

  • format (QuantizationType) –

    Quantization mode

  • io_type (str) –

    I/O type

  • conversion (ConversionType) –

    Conversion method

  • debug (bool) –

    Debug quantization

  • fallback (bool) –

    Fallback to float32

NamedParams

Named parameters is used to store parameters for a specific model, preprocessing, or augmentation. Typically name refers to class/method name and params is provided as kwargs.

Attributes:

HKMode

heartKIT task mode

HKTaskParams

Task configuration params

Functions

model_post_init
model_post_init(__context: Any) -> None

Post init hook

Source code in heartkit/defines.py
def model_post_init(self, __context: Any) -> None:
    """Post init hook"""

    if self.val_file and len(self.val_file.parts) == 1:
        self.val_file = self.job_dir / self.val_file

    if self.test_file and len(self.test_file.parts) == 1:
        self.test_file = self.job_dir / self.test_file

    if self.model_file and len(self.model_file.parts) == 1:
        self.model_file = self.job_dir / self.model_file

    if self.weights_file and len(self.weights_file.parts) == 1:
        self.weights_file = self.job_dir / self.weights_file

    if self.tflm_file and len(self.tflm_file.parts) == 1:
        self.tflm_file = self.job_dir / self.tflm_file