ecal.calculators.inference¶
Classes
|
This class is used to estimate the flops of the model inference, which is then used to estimate the energy consumption of the model inference. |
- class ecal.calculators.inference.Inference(model_name, input_size, num_samples, processor_flops_per_second, processor_max_power, calculator=None)[source]¶
Bases:
objectThis class is used to estimate the flops of the model inference, which is then used to estimate the energy consumption of the model inference.
- Parameters:
- __init__(model_name, input_size, num_samples, processor_flops_per_second, processor_max_power, calculator=None)[source]¶
Initialize Inference class :param calculator: FLOPCalculator implementation :param model_name: PyTorch model or model name :param input_size: Tuple of input size :param num_samples: int of number of samples :param processor_flops_per_second: float of processor flops per second :param processor_max_power: int of processor max power in watts