Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tf-spherical-hashing

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tf-spherical-hashing

Tensorflow implementation of Spherical Hashing.

  • 0.0.1
  • PyPI
  • Socket score

Maintainers
1

Spherical Hashing

A Tensorflow 2 implementation of Spherical Hashing.

Spherical hashing is a way to compute a binary encoding of a feature vector while still maintaining spatial coherence. This binary encoding can then be used for an approximate nearest neighbor solution since the compactness of this representation allows for faster neighbor search.

Usage

from spherical_hashing import train_spherical_hashing
import tensorflow as tf

x_train = tf.random.uniform(shape=(1000, 512), minval=-10.0, maxval=10.0)
sph_model = train_spherical_hashing_model(x_train, n_bits=32)

x_test = tf.random.uniform(shape=(100, 512), minval=-10.0, maxval=10.0)
bits = sph_model(x_test, apply_pack_bits=True)

Installation

pip install tf-spherical-hashing

Development

Run tests

./scripts/run-tests.sh

Publish pip package

./scripts/publish.sh

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc