Skip to main content

Universal Hyperbolic Geometry Library for PyTorch

Project description

Universal Hyperbolic Geometry (UHG)

A PyTorch library for hyperbolic deep learning using pure UHG principles.

Features

  • Pure projective geometry implementation
  • No differential geometry or manifold concepts
  • Cross-ratio preservation
  • Projective transformations
  • Graph neural networks
  • Optimizers and samplers

Quick Start

import torch
import uhg

# Create points in projective space
x = torch.randn(10, 3)
y = torch.randn(10, 3)

# Initialize UHG
uhg_proj = uhg.ProjectiveUHG()

# Transform points
x_proj = uhg_proj.transform(x)
y_proj = uhg_proj.transform(y)

# Compute projective distance
dist = uhg_proj.proj_dist(x_proj, y_proj)

# Compute cross-ratio
cr = uhg_proj.cross_ratio(x_proj[0], x_proj[1], x_proj[2], x_proj[3])

Installation

pip install uhg

Documentation

For detailed documentation, visit uhg.readthedocs.io.

Project details


Download files

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

Source Distribution

uhg-0.1.8.tar.gz (40.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uhg-0.1.8-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

Details for the file uhg-0.1.8.tar.gz.

File metadata

  • Download URL: uhg-0.1.8.tar.gz
  • Upload date:
  • Size: 40.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for uhg-0.1.8.tar.gz
Algorithm Hash digest
SHA256 bcda7ce9d745e1b167b978d926e54d031efe7552fa1679885d5571495f8b7c88
MD5 e8b31f04e3bca23a807c32ec0188e172
BLAKE2b-256 35e628d3e2441dfe0742ea0b2ccc5f219acb9d5093460bcfe0349eaa6e975352

See more details on using hashes here.

File details

Details for the file uhg-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: uhg-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 43.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for uhg-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 fbe9aa0653c0a5be5d6886e20316fb1a9830c78f655b328fc07f7e8cc7820ebb
MD5 fca1a0a4630d638e3f106d214cda4604
BLAKE2b-256 c0d83ffcf6429dfa12f162447dc4a8d51707b790d8eeb5c66e351bd13d8788da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page