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.12.tar.gz (41.0 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.12-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for uhg-0.1.12.tar.gz
Algorithm Hash digest
SHA256 f29525e063b0f74d64de04bf8a0c8532fe33c390bd575b5f13d55545b04a28f9
MD5 f7d9df68fe4575ecefd4698c441771fe
BLAKE2b-256 975ad43bc178a718cd013ef4049b9946f7b24c27e8ec9ca1e67ac955efc6f629

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uhg-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 4421fa91cc98a1c727cc6391464e728416ba79f8e7647bb71c708b868d525309
MD5 58eab4da4f646b304419bb59d6298a22
BLAKE2b-256 5989aee98842e85dd764a1a9c2764966ed001f4d06af09dd0e5194c1c6ba8431

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