minerva.analysis.complexity_performance_analysis
Classes
Perform a complexity/performance analysis on a model using custom data. |
Module Contents
- class minerva.analysis.complexity_performance_analysis.ComplexityPerformanceAnalysis(path=None, custom_input_size=None)
Bases:
minerva.analysis.model_analysis._ModelAnalysis
Perform a complexity/performance analysis on a model using custom data. The values computed are the KWh (kilowatts per hour) consumed, MACs (multiply- accumulative operations) employed, and the number of parameters in the model. The results are returned in a dictionary and, if provided, saved in the path directory or returned in the compute function. If necessary, random data can be employed.
- Parameters:
path (Optional[minerva.utils.typing.PathLike])
custom_input_size (Optional[Tuple])
- _custom_input_size = None
Compute the complexity/performance analysis.
Parameters
- pathOptional[PathLike], optional
Path to save the results of the analysis, by default None.
- custom_input_sizeOptional[Tuple], optional
Custom input size for the evaluation data, by default None. If None, the evaluation data is obtained from the data module.
- _path = None
- compute(model, data)
- Parameters:
model (lightning.LightningModule)
data (lightning.LightningDataModule)