Metadata-Version: 2.1
Name: flopper
Version: 0.1.2
Summary: A Python to count flops of pytorch models.
Author-email: Andrea Boscolo Camiletto <abcamiletto@gmail.com>
Project-URL: Homepage, https://github.com/abcamiletto/flopper
Project-URL: Repository, https://github.com/abcamiletto/flopper
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fvcore >=0.1.5
Requires-Dist: torch >=1.8
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: pre-commit ; extra == 'dev'

# Flopper - A FLOP counter for PyTorch

An enhanced FLOP counter based on fvcore with additional support to custom modules and simplified API
This tool is a lightweight wrapper around [fvcore](https://github.com/facebookresearch/fvcore) flop counter, which is a PyTorch based FLOP counter. It supports counting FLOPs for custom modules and provides a simplified API.

## Installation

```bash
pip install flopper
```

## Usage

```python
from flopper import count_flops

model = YourRandomModel()
batch = torch.randn(1, 3, 224, 224)

flops = count_flops(model, batch)
```
