Skip to main content

PyTorch module for random projection hashing

Project description

Random Projection Hashing

Provides a PyTorch module for random projection hashing with GPU acceleration. Similar tensors (cosine similarity) will be assigned the same hash with high probability.

Installation

$ pip install rph

Usage

See example.py for an example on how to use rph on DNA strings. Please note that rph can be used with any arbitrary tensors. In summary, this package provides a module RandomProjectionHashModule(input_dim, hash_bits) where input_dim is the size of the input tensors and hash_bits is the number of bits to use for the final hash value. For example, choosing 4 bits will result in all tensors being split into 16 buckets only.

Project details


Download files

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

Files for rph, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size rph-1.0.0-py3-none-any.whl (3.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size rph-1.0.0.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page