Counts number of parameters / MACs for ONNX models.
pip install onnx_opcounter
onnx_opcounter {path_to_onnx_model}
onnx_opcounter --calculate-macs {path_to_onnx_model}
from onnx_opcounter import calculate_params
import onnx
model = onnx.load_model('./path/to/onnx/model')
params = calculate_params(model)
print('Number of params:', params)
The software is covered by Apache License 2.0.