Skip to content

backend

Classes

HKInferenceBackend

HKInferenceBackend(params: HKTaskParams)

Backend inference engine base class

Parameters:

Source code in heartkit/backends/backend.py
def __init__(self, params: HKTaskParams) -> None:
    """Backend inference engine base class

    Args:
        params (HKTaskParams): Task parameters
    """
    self.params = params

Functions

open
open()

Open backend

Source code in heartkit/backends/backend.py
def open(self):
    """Open backend"""
    raise NotImplementedError
close
close()

Close backend

Source code in heartkit/backends/backend.py
def close(self):
    """Close backend"""
    raise NotImplementedError
set_inputs
set_inputs(inputs: NDArray)

Set inputs

Source code in heartkit/backends/backend.py
def set_inputs(self, inputs: npt.NDArray):
    """Set inputs"""
    raise NotImplementedError
perform_inference
perform_inference()

Perform inference

Source code in heartkit/backends/backend.py
def perform_inference(self):
    """Perform inference"""
    raise NotImplementedError
get_outputs
get_outputs() -> npt.NDArray

Get outputs

Source code in heartkit/backends/backend.py
def get_outputs(self) -> npt.NDArray:
    """Get outputs"""
    raise NotImplementedError