green_ai_bench.base_inference

source module green_ai_bench.base_inference

Base class for model inference on various hardware platforms.

Classes

  • BaseInference Base class for model inference on various hardware platforms.

source class BaseInference(model_path: str, use_GPU=False, **kwargs: Dict[str, Any])

Base class for model inference on various hardware platforms.

Initialize the BaseInference class.

Methods

  • setup_model Initialize the ONNX model for inference.

  • generate_data Generate input data for the model.

  • infer Empty inference function.

source method BaseInference.setup_model()None

Initialize the ONNX model for inference.

Raises

  • RuntimeError

source method BaseInference.generate_data()None

Generate input data for the model.

Raises

  • RuntimeError

source method BaseInference.infer()Optional[List[np.ndarray]]

Empty inference function.