check_shapes
check_shapes is a library for annotating and checking tensor shapes.
For example:
import tensorflow as tf
from gpflow.experimental.check_shapes import check_shapes
@tf.function
@check_shapes(
"features: [batch..., n_features]",
"weights: [n_features]",
"return: [batch...]",
)
def linear_model(features: tf.Tensor, weights: tf.Tensor) -> tf.Tensor:
return tf.einsum("...i,i -> ...", features, weights)
For more information see our documentation.
Installation
The recommended way to install check_shapes is from pypi:
pip install check_shapes
From source
To develop check_shapes, check it out from GitHub:
git clone git@github.com:GPflow/check_shapes.git
We use Poetry to install and manage dependencies. Follow their instructions for how to install Poetry itself. Then:
cd check_shapes
poetry install
To check you installation run our tests:
poetry run task test
For testing with different versions of Python and dependencies, see the poetryenv script.
Metadata
Release files for check-shapes 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| check_shapes-1.1.1.tar.gz | 32.7 kB | Without provenance | Details for check_shapes-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| check_shapes-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for check_shapes-1.1.1-py3-none-any.whl |
Total release size: 78.5 kB
Release files / check_shapes-1.1.1.tar.gz
| Download URL | check_shapes-1.1.1.tar.gz |
|---|---|
| Size | 32.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b699fcb1e60bb17e2c97007e444b89eeeea2a9102ff11d61fb52454af5348403
|
|
BLAKE2b-256 checksum How to use checksums |
21883d87f9d96acd5fbcf88cb27bc690da0a57f51a05dfabd570d413818be215
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.7.17 Linux/5.15.0-1042-azure
|
Release files / check_shapes-1.1.1-py3-none-any.whl
| Download URL | check_shapes-1.1.1-py3-none-any.whl |
|---|---|
| Size | 45.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0b5f6b8fc3e5d63933ef5884aec2a7ded7f2c7e541db1823abdf466a500bd6e
|
|
BLAKE2b-256 checksum How to use checksums |
f620bffce56003970ece7fa393232140428325a004bfb0631edb4e2b99df63e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.7.17 Linux/5.15.0-1042-azure
|
Security for check-shapes 1.1.1
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.