Metadata-Version: 2.1
Name: torchenhanced
Version: 0.3.2b4
Summary: Wrappers for pytorch stuff I use on the daily
Author-email: Vassilis Papadopoulos <frotaur@hotmail.co.uk>
License: MIT License
Project-URL: Homepage, https://github.com/frotaur/torchenhanced
Project-URL: Bug Tracker, https://github.com/frotaur/torchenhanced/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: torch
Requires-Dist: torchvision
Requires-Dist: matplotlib
Requires-Dist: tqdm
Requires-Dist: wandb
Requires-Dist: opencv-python
Requires-Dist: numpy
Requires-Dist: Pillow

# TorchEnhanced
Wrappers for pytorch stuff I use on the daily. Basically a minimal 'pytorch lightning', I was just not aware it existed at the time of creation.


## Basic Usage
Install with `pip install torchenhanced`.  

Here we describe how to use at a basic level the different components included in `torchenhanced`. There are many unrelated things it helps to do, so we dedicate a section to each.

### Improved nn.Module
`torchenhanced` defines two new classes which are meant as stand-in for `nn.Module`.

**DevModule**
Import with `from torchenhanced import DevModule`.
`DevModule` is short for 'DeviceModule'. It is a `nn.Module`, but has an additional attribute `device`, which helps keeps track of the current device it is on.

Use it just like `nn.Module`, except it needs to be initialized with a device :

```
    class MyModule(DevModule):
        def __init__(hidden, device='cpu'):
            super().__init__(device)
            layer = nn.Linear(hidden,hidden,device=self.device)
```

Works just [STILL WIP]


