Skip to main content

✴ Transformational Measures 📏

The Transformational Measures (tmeasures) library allows neural network designers to evaluate the invariance, equivariance and other properties of their models with respect to a set of transformations. Support for Pytorch (current) and Tensorflow/Keras (coming).

🔎 Visualizations

tmeasures allows computing invariance, same-equivariance and other transformational measures, and contains helpful functions to visualize these. The following are some examples of the results you can obtain with the library:

🔥 Invariance heatmap

Each column shows the invariance to rotation of a layer of a Neural Network. Each row/block inside each column indicates the invariance of a feature map or single neuron, depending on the layer.

📉 Average Invariance vs layer, same model

Plot the transformational and sample invariance to rotations of a simple neural network trained on MNIST, with and without data augmentation. The X axis indicates the layer, while the Y axis shows the average invariance of the layer.

📈 Average invariance by layer, different models:

Plot of the invariance to rotations of several well-known models trained on CIFAR10. The number of layers of each model is streched on a percentage scale, so that different models can be compared.

💻 PyTorch API

These notebooks contain step-by-step code and explanations to measure invariance in both custom and pretrained model, both using predefined and custom transformations. They can be executed in google colab directly. Alternatively, you can download them for local execution, but be aware you will have to provide your own virtualenv with torch and torchvision installed.

Other examples with multiple measures and pretrained models can be found in the doc folder of this repository.

💻 TensorFlow API

We are still developing the Tensorflow API.

📋 Examples

You can find many uses of this library in the repository with the code for the article Measuring (in)variances in Convolutional Networks, where this library was first presented. Also, in the code for the experiments of the PhD Thesis "Invariance and Same-Equivariance Measures for Convolutional Neural Networks" (spanish).

🤙🏽 Citing

If you use this library in your research, we kindly ask you to cite Invariance and Same-Equivariance Measures for Convolutional Neural Networks.

@article{quiroga20,
  author    = {Facundo Quiroga and
               Laura Lanzarini},
  title     = {Invariance and Same-Equivariance Measures for Convolutional Neural Networks},
  journal   = {J. Comput. Sci. Technol.},
  volume    = {20},
  number    = {1},
  pages     = {06},
  year      = {2020},
  url       = {https://doi.org/10.24215/16666038.20.e06},
  doi       = {10.24215/16666038.20.e06},
}

Metadata

Release files for tmeasures 1.2.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tmeasures 1.2.11
File Size Uploaded Provenance Actions
tmeasures-1.2.11.tar.gz 58.2 kB Without provenance Details for tmeasures-1.2.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tmeasures 1.2.11
File Interpreter ABI Platform Actions
tmeasures-1.2.11-py2.py3-none-any.whl Python 3, Python 2 none any Details for tmeasures-1.2.11-py2.py3-none-any.whl

Total release size: 134.7 kB

Release files / tmeasures-1.2.11.tar.gz

Download URL tmeasures-1.2.11.tar.gz
Size 58.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8fe024f6703270b138b33f70dfefa125df44dac89355c8434fb1b0723402319a
BLAKE2b-256 checksum
How to use checksums
140176908598154a808f2d42d0befbdcdc3eb9645df048fdc0036fddfd3c1ade
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / tmeasures-1.2.11-py2.py3-none-any.whl

Download URL tmeasures-1.2.11-py2.py3-none-any.whl
Size 76.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
85a814a50c2ddbafd5835b7bdc16c1fe6ecc77b12084a903b702ffc7272dc73a
BLAKE2b-256 checksum
How to use checksums
2aac5effc54d621beb00ee65a7f9a3a8065133ec7d9864a9bfbaf9acaf47582a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for tmeasures 1.2.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page