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
Release history Release notifications | RSS feed
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.14.tar.gz
(39.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
uhg-0.1.14-py3-none-any.whl
(42.5 kB
view details)
File details
Details for the file uhg-0.1.14.tar.gz.
File metadata
- Download URL: uhg-0.1.14.tar.gz
- Upload date:
- Size: 39.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70cc27efb5eb7d06e9507a4ae1e057828f307b175c8731d92ed7c8ce5144f8ef
|
|
| MD5 |
4b1255f97f80467fc6d6fa44fc939004
|
|
| BLAKE2b-256 |
b7e89e0f4bcd1cfc6a5f66b7b4f6032882311046a7d4c995953e6dc35cae760d
|
File details
Details for the file uhg-0.1.14-py3-none-any.whl.
File metadata
- Download URL: uhg-0.1.14-py3-none-any.whl
- Upload date:
- Size: 42.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1c7e895d4e40a781ab76c929378431ac68be9422781ae1fdfdf5bdb8434ae94
|
|
| MD5 |
89bff5b4632c79b9fd89c55808ed3bc0
|
|
| BLAKE2b-256 |
d730cf4e7d83e2cf014c63572d225ea097d9deb6d211f0209c3c3c9b830265fd
|