Skip to main content

MaskedTensors for PyTorch

Project description

maskedtensor

Warning: This is a prototype library that is actively under development. If you have suggestions or potential use cases that you'd like addressed, please open a Github issue; we welcome any thoughts, feedback, and contributions!

MaskedTensor is a prototype library that is part of the PyTorch project and is an extension of torch.Tensor that provides the ability to mask out the value for any given element. Elements with masked out values are ignored during computation and give the user access to advanced semantics such as masked reductions, safe softmax, masked matrix multiplication, filtering NaNs, and masking out certain gradient values.

Installation

Binaries

To install the official MaskedTensor via pip, use the following command:

pip install maskedtensor

For the dev (unstable) nightly version that contains the most recent features, please replace maskedtensor with maskedtensor-nightly.

Note that MaskedTensor requires PyTorch >= 1.11, which you can get on the the main website

From Source

To install from source, you will need Python 3.7 or later, and we highly recommend that you use an Anaconda environment. Then run:

python setup.py develop

Documentation

Please find documentation on the MaskedTensor Website.

Building documentation

Please follow the instructions in the docs README.

Notebooks

For an introduction and instructions on how to use MaskedTensors and what they are useful for, there are a nubmer of tutorials on the MaskedTensor website.

License

maskedtensor is licensed under BSD 3-Clause

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

File details

Details for the file maskedtensor_nightly-0.11.dev2022318-py3-none-any.whl.

File metadata

  • Download URL: maskedtensor_nightly-0.11.dev2022318-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for maskedtensor_nightly-0.11.dev2022318-py3-none-any.whl
Algorithm Hash digest
SHA256 f0c8c0f1e79a2c46e369f2269d786102212ac35a4f82b0c2ecf0db91810242ef
MD5 8669a9bf825eecdbb20051bc075b32d1
BLAKE2b-256 39da27b653136b4683ddcdc03045cf98f6e4f96e6db86637ba908238162e3486

See more details on using hashes here.

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