Skip to main content

Delve lets you view Pytorch layer saturation statistics

Project description

# delve

Inspect layer saturation and spectral data in your PyTorch models.

**delve**, *verb*:
```
1. Reach inside a receptacle and search for something
2. Research or make painstaking inquiries into something
```
## Getting started

```bash
pip install delve
```

### Layer Saturation
Pass a PyTorch model (or layers) to CheckLayerSat:

```python
from delve import CheckLayerSat

model = TwoLayerNet()
layers = [model.linear1, model.linear2]
stats = CheckLayerSat('runs', layers)
```

#### Optimize neural network topology

Ever wonder how big your layer size should be? Delve helps you visualize the effect of modifying the layer size on your layer saturation.

For example, see how modifying the hidden layer size of this network affects the second layer saturation but not the first. Here we show variations of the fully-connected "linear2" layer (blue is 256 and orange is 8):

![saturation](images/layer1-saturation.png)

![saturation](images/layer2-saturation.png)

### Spectral analysis

Plot the top 5 eigenvalues of each layer:

```python
stats = CheckLayerSat('runs', layers, 'spectrum')
```

![spectrum](images/spectrum.png)

### Intrinsic dimensionality

View the intrinsic dimensionality of models in realtime:


![intrinsic_dimensionality-layer2](images/layer2-intrinsic.png)

This comparison suggests that the 8-unit layer is too saturated and that a larger layer is needed.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

delve-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

delve-0.1.0-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file delve-0.1.0.tar.gz.

File metadata

  • Download URL: delve-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for delve-0.1.0.tar.gz
Algorithm Hash digest
SHA256 71b0a5c051f82799ae1f4e97bf5f0ec8091623612f04dc063592ed25d7138f6c
MD5 4f5562602d98d62c7702d395176b5691
BLAKE2b-256 2667b4804eed06e19c949b27672acec7a509116139b2e3ab51937a2063633187

See more details on using hashes here.

Provenance

File details

Details for the file delve-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for delve-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 37ef1eca09a0185bc2cd64978fd9cc9981713fdb16a4e0ccbb84641f663b0a9c
MD5 14e5fc213d43d5101ef125d21be47caa
BLAKE2b-256 a9538c4a9f757049d59ddb6c150b6b57eca282a964a1f4a0befd48927606ed33

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page